Skip to content

Commit

Permalink
Merge pull request #142 from ebiggers/goimports
Browse files Browse the repository at this point in the history
Fix 'make format'-related CI failure
  • Loading branch information
josephlr authored Aug 29, 2019
2 parents b41569d + c5661ed commit 8a3acda
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ override GO_FLAGS += --ldflags '$(GO_LINK_FLAGS)'
###### Find All Files and Directories ######
FILES := $(shell find . \( -path ./vendor -o -path "./.*" \) -prune -o -type f -printf "%P\n")
GO_FILES := $(filter %.go,$(FILES))
GO_NONGEN_FILES := $(filter-out %.pb.go,$(GO_FILES))
GO_DIRS := $(sort $(dir $(GO_FILES)))
C_FILES := $(filter %.c %.h,$(FILES))
PROTO_FILES := $(filter %.proto,$(FILES))
Expand All @@ -95,7 +96,7 @@ gen: $(BIN)/protoc $(BIN)/protoc-gen-go $(PROTO_FILES)
protoc --go_out=. $(PROTO_FILES)

format: $(BIN)/goimports
goimports -w $(GO_DIRS)
goimports -w $(GO_NONGEN_FILES)
clang-format -i -style=Google $(C_FILES)

lint: $(BIN)/golint $(BIN)/staticcheck $(BIN)/misspell
Expand Down
19 changes: 8 additions & 11 deletions filesystem/mountpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,16 @@
package filesystem

import (
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
"sort"
"strings"
"sync"

"github.com/pkg/errors"
)

/*
Expand All @@ -35,17 +43,6 @@ const char* read_mode = "r";
*/
import "C"

import (
"fmt"
"log"
"path/filepath"
"sort"
"strings"
"sync"

"github.com/pkg/errors"
)

var (
// These maps hold data about the state of the system's mountpoints.
mountsByPath map[string]*Mount
Expand Down

0 comments on commit 8a3acda

Please sign in to comment.