Update module github.com/kevinburke/ssh_config to v1.4.0

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2025-08-20 00:34:25 +00:00
committed by GitHub
parent bb18ae6ee3
commit 40cd207437
10 changed files with 73 additions and 27 deletions

View File

@@ -21,9 +21,9 @@ type sshParser struct {
type sshParserStateFn func() sshParserStateFn
// Formats and panics an error message based on a token
func (p *sshParser) raiseErrorf(tok *token, msg string, args ...interface{}) {
func (p *sshParser) raiseErrorf(tok *token, msg string) {
// TODO this format is ugly
panic(tok.Position.String() + ": " + fmt.Sprintf(msg, args...))
panic(tok.Position.String() + ": " + msg)
}
func (p *sshParser) raiseError(tok *token, err error) {
@@ -118,7 +118,7 @@ func (p *sshParser) parseKV() sshParserStateFn {
}
pat, err := NewPattern(strPatterns[i])
if err != nil {
p.raiseErrorf(val, "Invalid host pattern: %v", err)
p.raiseErrorf(val, fmt.Sprintf("Invalid host pattern: %v", err))
return nil
}
patterns = append(patterns, pat)
@@ -144,7 +144,7 @@ func (p *sshParser) parseKV() sshParserStateFn {
return nil
}
if err != nil {
p.raiseErrorf(val, "Error parsing Include directive: %v", err)
p.raiseErrorf(val, fmt.Sprintf("Error parsing Include directive: %v", err))
return nil
}
lastHost.Nodes = append(lastHost.Nodes, inc)