mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-07 01:09:45 +02:00
Bump go-git
This commit is contained in:
29
vendor/github.com/kevinburke/ssh_config/parser.go
generated
vendored
29
vendor/github.com/kevinburke/ssh_config/parser.go
generated
vendored
@ -3,6 +3,7 @@ package ssh_config
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"unicode"
|
||||
)
|
||||
|
||||
type sshParser struct {
|
||||
@ -122,11 +123,16 @@ func (p *sshParser) parseKV() sshParserStateFn {
|
||||
}
|
||||
patterns = append(patterns, pat)
|
||||
}
|
||||
// val.val at this point could be e.g. "example.com "
|
||||
hostval := strings.TrimRightFunc(val.val, unicode.IsSpace)
|
||||
spaceBeforeComment := val.val[len(hostval):]
|
||||
val.val = hostval
|
||||
p.config.Hosts = append(p.config.Hosts, &Host{
|
||||
Patterns: patterns,
|
||||
Nodes: make([]Node, 0),
|
||||
EOLComment: comment,
|
||||
hasEquals: hasEquals,
|
||||
Patterns: patterns,
|
||||
Nodes: make([]Node, 0),
|
||||
EOLComment: comment,
|
||||
spaceBeforeComment: spaceBeforeComment,
|
||||
hasEquals: hasEquals,
|
||||
})
|
||||
return p.parseStart
|
||||
}
|
||||
@ -144,13 +150,16 @@ func (p *sshParser) parseKV() sshParserStateFn {
|
||||
lastHost.Nodes = append(lastHost.Nodes, inc)
|
||||
return p.parseStart
|
||||
}
|
||||
shortval := strings.TrimRightFunc(val.val, unicode.IsSpace)
|
||||
spaceAfterValue := val.val[len(shortval):]
|
||||
kv := &KV{
|
||||
Key: key.val,
|
||||
Value: val.val,
|
||||
Comment: comment,
|
||||
hasEquals: hasEquals,
|
||||
leadingSpace: key.Position.Col - 1,
|
||||
position: key.Position,
|
||||
Key: key.val,
|
||||
Value: shortval,
|
||||
spaceAfterValue: spaceAfterValue,
|
||||
Comment: comment,
|
||||
hasEquals: hasEquals,
|
||||
leadingSpace: key.Position.Col - 1,
|
||||
position: key.Position,
|
||||
}
|
||||
lastHost.Nodes = append(lastHost.Nodes, kv)
|
||||
return p.parseStart
|
||||
|
Reference in New Issue
Block a user