Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit fd7e11e

Browse files
committed
gofmt
1 parent 1e6f808 commit fd7e11e

File tree

15 files changed

+22
-18
lines changed

15 files changed

+22
-18
lines changed

cmd/coder/auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55

66
"go.coder.com/flog"
77

8-
"cdr.dev/coder-cli/internal/entclient"
98
"cdr.dev/coder-cli/internal/config"
9+
"cdr.dev/coder-cli/internal/entclient"
1010
)
1111

1212
func requireAuth() *entclient.Client {

cmd/coder/envs.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ package main
22

33
import (
44
"fmt"
5+
56
"github.com/spf13/pflag"
7+
68
"go.coder.com/cli"
79
)
810

@@ -11,8 +13,8 @@ type envsCmd struct {
1113

1214
func (cmd envsCmd) Spec() cli.CommandSpec {
1315
return cli.CommandSpec{
14-
Name: "envs",
15-
Desc: "get a list of active environment",
16+
Name: "envs",
17+
Desc: "get a list of active environment",
1618
}
1719
}
1820

cmd/coder/login.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88

99
"github.com/pkg/browser"
1010
"github.com/spf13/pflag"
11+
1112
"go.coder.com/cli"
1213
"go.coder.com/flog"
1314

cmd/coder/logout.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ import (
44
"os"
55

66
"github.com/spf13/pflag"
7+
78
"go.coder.com/cli"
89
"go.coder.com/flog"
910

1011
"cdr.dev/coder-cli/internal/config"
1112
)
1213

1314
type logoutCmd struct {
14-
1515
}
1616

1717
func (cmd logoutCmd) Spec() cli.CommandSpec {
1818
return cli.CommandSpec{
19-
Name: "logout",
20-
Desc: "remote local authentication credentials (if any)",
19+
Name: "logout",
20+
Desc: "remote local authentication credentials (if any)",
2121
}
2222
}
2323

@@ -32,4 +32,3 @@ func (cmd logoutCmd) Run(_ *pflag.FlagSet) {
3232
}
3333
flog.Success("logged out")
3434
}
35-

cmd/coder/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"os"
88

99
"github.com/spf13/pflag"
10+
1011
"go.coder.com/cli"
1112
)
1213

cmd/coder/sync.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"strings"
88

99
"github.com/spf13/pflag"
10+
1011
"go.coder.com/cli"
1112
"go.coder.com/flog"
1213

cmd/coder/url.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"net/http"
77

88
"github.com/spf13/pflag"
9+
910
"go.coder.com/cli"
1011
"go.coder.com/flog"
1112
)

cmd/coder/version.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"runtime"
66

77
"github.com/spf13/pflag"
8+
89
"go.coder.com/cli"
910
)
1011

internal/config/dir.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func open(path string, flag int, mode os.FileMode) (*os.File, error) {
2525
return os.OpenFile(path, flag, mode)
2626
}
2727

28-
func write(path string, mode os.FileMode, dat []byte) error {
28+
func write(path string, mode os.FileMode, dat []byte) error {
2929
fi, err := open(path, os.O_WRONLY|os.O_TRUNC|os.O_CREATE, mode)
3030
if err != nil {
3131
return err

internal/loginsrv/server.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
type Server struct {
1010
TokenCond *sync.Cond
11-
Token string
11+
Token string
1212
}
1313

1414
func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
@@ -27,5 +27,3 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
2727
w.WriteHeader(http.StatusOK)
2828
fmt.Fprintf(w, "You may close this window now")
2929
}
30-
31-

internal/sync/eventcache.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"time"
66

77
"github.com/rjeczalik/notify"
8+
89
"go.coder.com/flog"
910
)
1011

@@ -59,7 +60,7 @@ func (cache eventCache) ConcurrentEvents() []timedEvent {
5960
if err != nil {
6061
continue
6162
}
62-
if info.IsDir() {
63+
if info.IsDir() {
6364
continue
6465
}
6566
r = append(r, ev)

internal/sync/sync.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ import (
1616

1717
"github.com/gorilla/websocket"
1818
"github.com/rjeczalik/notify"
19-
"go.coder.com/flog"
2019
"golang.org/x/sync/semaphore"
2120
"golang.org/x/xerrors"
2221

22+
"go.coder.com/flog"
23+
2324
"cdr.dev/coder-cli/internal/entclient"
2425
"cdr.dev/coder-cli/wush"
2526
)

internal/sync/title.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ func setConsoleTitle(title string) {
1515
fmt.Printf("\033]0;%s\007", title)
1616
}
1717

18-
1918
func fmtUpdateTitle(path string) string {
2019
return "🚀 updating " + filepath.Base(path)
21-
}
20+
}

wush/doc.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@
44
// This package provides the protocol, but no facilities beyond that for creating a wush server.
55
// This protocol was designed haphazardly and will likely be rebuild in the near term.
66
package wush
7-

wush/servermessage.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ const (
1818
// ServerMessage is sent over websocket type binary.
1919
type ServerMessage struct {
2020
StreamID byte
21-
Body io.Reader
22-
}
21+
Body io.Reader
22+
}

0 commit comments

Comments
 (0)