Skip to content

Commit

Permalink
fix golangci failures
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Wang <wachao@vmware.com>
  • Loading branch information
ahrtr committed Apr 21, 2023
1 parent ea851ec commit c256342
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ GOFILES = $(shell find . -name \*.go)

.PHONY: fmt
fmt:
@echo "Verifying gofmt, failures can be fixed with ./scripts/fix.sh"
@echo "Verifying gofmt"
@!(gofmt -l -s -d ${GOFILES} | grep '[a-z]')

@echo "Verifying goimports, failures can be fixed with ./scripts/fix.sh"
@echo "Verifying goimports"
@!(go run golang.org/x/tools/cmd/goimports@latest -l -d ${GOFILES} | grep '[a-z]')

.PHONY: lint
Expand Down
5 changes: 1 addition & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ func defragCommandFunc(cmd *cobra.Command, args []string) {
fmt.Printf("Defragmenting endpoint: %s\n", ep)

evalRet, err := evaluate(globalCfg, statusList[i])
if err != nil {

}
if !evalRet || err != nil {
if err != nil {
failures++
Expand Down Expand Up @@ -126,7 +123,7 @@ func defragCommandFunc(cmd *cobra.Command, args []string) {
ctx, cancel := commandCtx(globalCfg.commandTimeout)
startTs := time.Now()
_, err = c.Defragment(ctx, ep)
d := time.Now().Sub(startTs)
d := time.Since(startTs)
cancel()

if err != nil {
Expand Down

0 comments on commit c256342

Please sign in to comment.