Skip to content

Commit ce04db7

Browse files
committed
chore(makefile): change gofmt toll to gofumpt
1 parent 355f45a commit ce04db7

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
GOFMT ?= gofmt "-s"
1+
GOFMT ?= gofumpt -l -s
22
GO ?= go
33
PACKAGES ?= $(shell $(GO) list ./...)
44
SOURCES ?= $(shell find . -name "*.go" -type f)
55

66
all: lint
77

88
fmt:
9+
@hash gofumpt > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
10+
$(GO) get -u mvdan.cc/gofumpt; \
11+
fi
912
$(GOFMT) -w $(SOURCES)
1013

1114
vet:
@@ -33,6 +36,9 @@ misspell:
3336

3437
.PHONY: fmt-check
3538
fmt-check:
39+
@hash gofumpt > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
40+
$(GO) get -u mvdan.cc/gofumpt; \
41+
fi
3642
@diff=$$($(GOFMT) -d $(SOURCES)); \
3743
if [ -n "$$diff" ]; then \
3844
echo "Please run 'make fmt' and commit the result:"; \

easyssh.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,6 @@ loop:
376376
// Scp uploads sourceFile to remote machine like native scp console app.
377377
func (ssh_conf *MakeConfig) Scp(sourceFile string, etargetFile string) error {
378378
session, client, err := ssh_conf.Connect()
379-
380379
if err != nil {
381380
return err
382381
}

example/ssh/ssh.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func main() {
1313
User: "appleboy",
1414
Server: "example.com",
1515
// Optional key or Password without either we try to contact your agent SOCKET
16-
//Password: "password",
16+
// Password: "password",
1717
// Paste your source content of private key
1818
// Key: `-----BEGIN RSA PRIVATE KEY-----
1919
// MIIEpAIBAAKCAQEA4e2D/qPN08pzTac+a8ZmlP1ziJOXk45CynMPtva0rtK/RB26
@@ -29,7 +29,7 @@ func main() {
2929

3030
// Optional fingerprint SHA256 verification
3131
// Get Fingerprint: ssh.FingerprintSHA256(key)
32-
//Fingerprint: "SHA256:mVPwvezndPv/ARoIadVY98vAC0g+P/5633yTC4d/wXE"
32+
// Fingerprint: "SHA256:mVPwvezndPv/ARoIadVY98vAC0g+P/5633yTC4d/wXE"
3333

3434
// Enable the use of insecure ciphers and key exchange methods.
3535
// This enables the use of the the following insecure ciphers and key exchange methods:
@@ -51,5 +51,4 @@ func main() {
5151
} else {
5252
fmt.Println("don is :", done, "stdout is :", stdout, "; stderr is :", stderr)
5353
}
54-
5554
}

0 commit comments

Comments
 (0)