mirror of
https://github.com/Myzel394/config-lsp.git
synced 2025-06-18 23:15:26 +02:00
20 lines
471 B
Go
20 lines
471 B
Go
package openssh
|
|
|
|
import (
|
|
"regexp"
|
|
)
|
|
|
|
func createOpenSSHConfigParser() SimpleConfigParser {
|
|
return SimpleConfigParser{
|
|
Lines: make(map[string]SimpleConfigLine),
|
|
Options: 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()
|