| 1 | package ssh_configscip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/ |
| 2 | |
| 3 | import "fmtscip-go gomod github.com/golang/go/src go1.18 fmt/" |
| 4 | |
| 5 | type tokenscip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/token# struct { |
| 6 | Positionscip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/token#Position. |
| 7 | typscip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/token#typ. tokenTypescip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/tokenType# |
| 8 | valscip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/token#val. string |
| 9 | } |
| 10 | |
| 11 | func (t tokenscip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/token#) Stringscip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/token#String().() string { |
| 12 | switch t.typscip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/token#typ. { |
| 13 | case tokenEOFscip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/tokenEOF.: |
| 14 | return "EOF" |
| 15 | } |
| 16 | return fmtscip-go gomod github.com/golang/go/src go1.18 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.18 fmt/Sprintf().("%q", t.valscip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/token#val.) |
| 17 | } |
| 18 | |
| 19 | type tokenTypescip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/tokenType# int |
| 20 | |
| 21 | const ( |
| 22 | eofscip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/eof. = -(iota + 1) |
| 23 | ) |
| 24 | |
| 25 | const ( |
| 26 | tokenErrorscip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/tokenError. tokenTypescip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/tokenType# = iota |
| 27 | tokenEOFscip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/tokenEOF. |
| 28 | tokenEmptyLinescip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/tokenEmptyLine. |
| 29 | tokenCommentscip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/tokenComment. |
| 30 | tokenKeyscip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/tokenKey. |
| 31 | tokenEqualsscip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/tokenEquals. |
| 32 | tokenStringscip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/tokenString. |
| 33 | ) |
| 34 | |
| 35 | func isSpacescip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/isSpace().(r rune) bool { |
| 36 | return r == ' ' || r == '\t' |
| 37 | } |
| 38 | |
| 39 | func isKeyStartCharscip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/isKeyStartChar().(r rune) bool { |
| 40 | return !(isSpacescip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/isSpace().(r) || r == '\r' || r == '\n' || r == eofscip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/eof.) |
| 41 | } |
| 42 | |
| 43 | // I'm not sure that this is correct |
| 44 | func isKeyCharscip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/isKeyChar().(r rune) bool { |
| 45 | // Keys start with the first character that isn't whitespace or [ and end |
| 46 | // with the last non-whitespace character before the equals sign. Keys |
| 47 | // cannot contain a # character." |
| 48 | return !(r == '\r' || r == '\n' || r == eofscip-go gomod github.com/dimonomid/ssh_config . `github.com/dimonomid/ssh_config`/eof. || r == '=') |
| 49 | } |