mirror of
https://github.com/Myzel394/config-lsp.git
synced 2025-06-18 23:15:26 +02:00
26 lines
469 B
Go
26 lines
469 B
Go
package handlers
|
|
|
|
import (
|
|
"config-lsp/common"
|
|
"regexp"
|
|
)
|
|
|
|
func createOpenSSHConfigParser() common.SimpleConfigParser {
|
|
pattern, err := regexp.Compile(`^(?:#|\s*$)`)
|
|
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
return common.SimpleConfigParser{
|
|
Lines: make(map[string]common.SimpleConfigLine),
|
|
Options: common.SimpleConfigOptions{
|
|
Separator: " ",
|
|
IgnorePattern: *pattern,
|
|
AvailableOptions: &Options,
|
|
},
|
|
}
|
|
}
|
|
|
|
var Parser = createOpenSSHConfigParser()
|