mirror of
https://github.com/Myzel394/config-lsp.git
synced 2025-06-19 07:25:27 +02:00
21 lines
520 B
Go
21 lines
520 B
Go
package openssh
|
|
|
|
import (
|
|
"config-lsp/common"
|
|
"regexp"
|
|
)
|
|
|
|
func createOpenSSHConfigParser() common.SimpleConfigParser {
|
|
return common.SimpleConfigParser{
|
|
Lines: make(map[string]common.SimpleConfigLine),
|
|
Options: common.SimpleConfigOptions{
|
|
Separator: *regexp.MustCompile(`(?m)^\s*(?P<OptionName>\w+)(?P<Separator>\s*)(?P<Value>.*)\s*$`),
|
|
IgnorePattern: *regexp.MustCompile(`^(?:#|\s*$)`),
|
|
IdealSeparator: " ",
|
|
AvailableOptions: &Options,
|
|
},
|
|
}
|
|
}
|
|
|
|
var Parser = createOpenSSHConfigParser()
|