mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
various: add golangci-lint, fix issues (#7905)
This adds an initial and intentionally minimal configuration for golang-ci, fixes the issues reported, and adds a GitHub Action to check new pull requests against this linter configuration. Signed-off-by: Andrew Dunham <andrew@du.nham.ca> Change-Id: I8f38fbc315836a19a094d0d3e986758b9313f163
This commit is contained in:
@@ -548,7 +548,7 @@ var opcodeShortName = map[uint8]string{
|
||||
gossh.TTY_OP_OSPEED: "tty_op_ospeed",
|
||||
}
|
||||
|
||||
// startWithPTY starts cmd with a psuedo-terminal attached to Stdin, Stdout and Stderr.
|
||||
// startWithPTY starts cmd with a pseudo-terminal attached to Stdin, Stdout and Stderr.
|
||||
func (ss *sshSession) startWithPTY() (ptyFile *os.File, err error) {
|
||||
ptyReq := ss.ptyReq
|
||||
cmd := ss.cmd
|
||||
|
@@ -838,7 +838,7 @@ type sshSession struct {
|
||||
exitOnce sync.Once
|
||||
}
|
||||
|
||||
func (ss *sshSession) vlogf(format string, args ...interface{}) {
|
||||
func (ss *sshSession) vlogf(format string, args ...any) {
|
||||
if sshVerboseLogging() {
|
||||
ss.logf(format, args...)
|
||||
}
|
||||
@@ -1575,7 +1575,7 @@ type loggingWriter struct {
|
||||
}
|
||||
|
||||
func (w loggingWriter) Write(p []byte) (n int, err error) {
|
||||
j, err := json.Marshal([]interface{}{
|
||||
j, err := json.Marshal([]any{
|
||||
time.Since(w.r.start).Seconds(),
|
||||
w.dir,
|
||||
string(p),
|
||||
|
Reference in New Issue
Block a user