aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Majewsky <majewsky@gmx.net>2020-03-28 13:53:10 +0100
committerStefan Majewsky <majewsky@gmx.net>2020-03-28 13:53:10 +0100
commited2b9374599cc00467b1c27121318748cc0d3f49 (patch)
tree65e3200a0b69817b24ae772223d1d852a52458af
parent1ff86053ddef8de3247909434e0bd7000c060f2a (diff)
downloadgofu-ed2b9374599cc00467b1c27121318748cc0d3f49.tar.gz
rename pkg/ to internal/
-rw-r--r--Makefile10
-rw-r--r--internal/cli/command.go (renamed from pkg/cli/command.go)0
-rw-r--r--internal/cli/interface.go (renamed from pkg/cli/interface.go)0
-rw-r--r--internal/cli/query.go (renamed from pkg/cli/query.go)0
-rw-r--r--internal/i3status/battery.go (renamed from pkg/i3status/battery.go)0
-rw-r--r--internal/i3status/main.go (renamed from pkg/i3status/main.go)0
-rw-r--r--internal/i3status/net.go (renamed from pkg/i3status/net.go)0
-rw-r--r--internal/prompt/cloud.go (renamed from pkg/prompt/cloud.go)0
-rw-r--r--internal/prompt/git.go (renamed from pkg/prompt/git.go)0
-rw-r--r--internal/prompt/login.go (renamed from pkg/prompt/login.go)0
-rw-r--r--internal/prompt/main.go (renamed from pkg/prompt/main.go)2
-rw-r--r--internal/prompt/misc.go (renamed from pkg/prompt/misc.go)0
-rw-r--r--internal/prompt/pwd.go (renamed from pkg/prompt/pwd.go)0
-rw-r--r--internal/rtree/get_test.go (renamed from pkg/rtree/get_test.go)0
-rw-r--r--internal/rtree/index.go (renamed from pkg/rtree/index.go)2
-rw-r--r--internal/rtree/init.go (renamed from pkg/rtree/init.go)2
-rw-r--r--internal/rtree/main.go (renamed from pkg/rtree/main.go)2
-rw-r--r--internal/rtree/remote.go (renamed from pkg/rtree/remote.go)0
-rw-r--r--internal/rtree/repo.go (renamed from pkg/rtree/repo.go)2
-rw-r--r--internal/rtree/shared_test.go (renamed from pkg/rtree/shared_test.go)2
-rw-r--r--main.go6
21 files changed, 14 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index 733d6ee..1836b3c 100644
--- a/Makefile
+++ b/Makefile
@@ -24,11 +24,11 @@ install: FORCE all
for APPLET in $(APPLETS); do ln -s gofu "$(DESTDIR)$(PREFIX)/bin/$${APPLET}"; done
# which packages to test with static checkers?
-GO_ALLPKGS := $(PKG) $(shell $(GO) list $(PKG)/pkg/...)
+GO_ALLPKGS := $(PKG) $(shell $(GO) list $(PKG)/internal/...)
# which packages to test with `go test`?
-GO_TESTPKGS := $(shell $(GO) list -f '{{if .TestGoFiles}}{{.ImportPath}}{{end}}' $(PKG)/pkg/...)
+GO_TESTPKGS := $(shell $(GO) list -f '{{if .TestGoFiles}}{{.ImportPath}}{{end}}' $(PKG)/internal/...)
# which packages to measure coverage for?
-GO_COVERPKGS := $(shell $(GO) list $(PKG)/pkg/...)
+GO_COVERPKGS := $(shell $(GO) list $(PKG)/internal/...)
# output files from `go test`
GO_COVERFILES := $(patsubst %,build/%.cover.out,$(subst /,_,$(GO_TESTPKGS)))
@@ -40,8 +40,8 @@ comma := ,
check: all static-check build/cover.html FORCE
@echo -e "\e[1;32m>> All tests successful.\e[0m"
static-check: FORCE
- @if s="$$(gofmt -s -l *.go pkg 2>/dev/null)" && test -n "$$s"; then printf ' => %s\n%s\n' gofmt "$$s"; false; fi
- @if s="$$(golint . && find pkg -type d -exec golint {} \; 2>/dev/null)" && test -n "$$s"; then printf ' => %s\n%s\n' golint "$$s"; false; fi
+ @if s="$$(gofmt -s -l *.go internal 2>/dev/null)" && test -n "$$s"; then printf ' => %s\n%s\n' gofmt "$$s"; false; fi
+ @if s="$$(golint . && find internal -type d -exec golint {} \; 2>/dev/null)" && test -n "$$s"; then printf ' => %s\n%s\n' golint "$$s"; false; fi
$(GO) vet $(GO_ALLPKGS)
build/%.cover.out: FORCE
$(GO) test $(GO_BUILDFLAGS) -ldflags '$(GO_LDFLAGS)' -coverprofile=$@ -covermode=count -coverpkg=$(subst $(space),$(comma),$(GO_COVERPKGS)) $(subst _,/,$*)
diff --git a/pkg/cli/command.go b/internal/cli/command.go
index a9938d1..a9938d1 100644
--- a/pkg/cli/command.go
+++ b/internal/cli/command.go
diff --git a/pkg/cli/interface.go b/internal/cli/interface.go
index a88212b..a88212b 100644
--- a/pkg/cli/interface.go
+++ b/internal/cli/interface.go
diff --git a/pkg/cli/query.go b/internal/cli/query.go
index add170c..add170c 100644
--- a/pkg/cli/query.go
+++ b/internal/cli/query.go
diff --git a/pkg/i3status/battery.go b/internal/i3status/battery.go
index e41f189..e41f189 100644
--- a/pkg/i3status/battery.go
+++ b/internal/i3status/battery.go
diff --git a/pkg/i3status/main.go b/internal/i3status/main.go
index 4af726a..4af726a 100644
--- a/pkg/i3status/main.go
+++ b/internal/i3status/main.go
diff --git a/pkg/i3status/net.go b/internal/i3status/net.go
index 7367b28..7367b28 100644
--- a/pkg/i3status/net.go
+++ b/internal/i3status/net.go
diff --git a/pkg/prompt/cloud.go b/internal/prompt/cloud.go
index 72bd6f9..72bd6f9 100644
--- a/pkg/prompt/cloud.go
+++ b/internal/prompt/cloud.go
diff --git a/pkg/prompt/git.go b/internal/prompt/git.go
index 8393c3e..8393c3e 100644
--- a/pkg/prompt/git.go
+++ b/internal/prompt/git.go
diff --git a/pkg/prompt/login.go b/internal/prompt/login.go
index 92cc270..92cc270 100644
--- a/pkg/prompt/login.go
+++ b/internal/prompt/login.go
diff --git a/pkg/prompt/main.go b/internal/prompt/main.go
index 1fc60d9..dcef513 100644
--- a/pkg/prompt/main.go
+++ b/internal/prompt/main.go
@@ -25,7 +25,7 @@ import (
"golang.org/x/crypto/ssh/terminal"
- "github.com/majewsky/gofu/pkg/cli"
+ "github.com/majewsky/gofu/internal/cli"
)
//Exec executes the prettyprompt applet and returns an exit code (0 for
diff --git a/pkg/prompt/misc.go b/internal/prompt/misc.go
index 124015a..124015a 100644
--- a/pkg/prompt/misc.go
+++ b/internal/prompt/misc.go
diff --git a/pkg/prompt/pwd.go b/internal/prompt/pwd.go
index 1b93987..1b93987 100644
--- a/pkg/prompt/pwd.go
+++ b/internal/prompt/pwd.go
diff --git a/pkg/rtree/get_test.go b/internal/rtree/get_test.go
index bdd0f2e..bdd0f2e 100644
--- a/pkg/rtree/get_test.go
+++ b/internal/rtree/get_test.go
diff --git a/pkg/rtree/index.go b/internal/rtree/index.go
index 4e10ffd..4ca7a41 100644
--- a/pkg/rtree/index.go
+++ b/internal/rtree/index.go
@@ -28,7 +28,7 @@ import (
"sort"
"strings"
- "github.com/majewsky/gofu/pkg/cli"
+ "github.com/majewsky/gofu/internal/cli"
yaml "gopkg.in/yaml.v2"
)
diff --git a/pkg/rtree/init.go b/internal/rtree/init.go
index 1d2dc10..569f042 100644
--- a/pkg/rtree/init.go
+++ b/internal/rtree/init.go
@@ -24,7 +24,7 @@ import (
"regexp"
"strings"
- "github.com/majewsky/gofu/pkg/cli"
+ "github.com/majewsky/gofu/internal/cli"
)
//RemoteAlias describes an alias that can be used in a Git remote URL (as
diff --git a/pkg/rtree/main.go b/internal/rtree/main.go
index f172f7f..d1692cd 100644
--- a/pkg/rtree/main.go
+++ b/internal/rtree/main.go
@@ -21,7 +21,7 @@ package rtree
import (
"strings"
- "github.com/majewsky/gofu/pkg/cli"
+ "github.com/majewsky/gofu/internal/cli"
)
//Exec executes the rtree applet and returns an exit code (0 for success, >0
diff --git a/pkg/rtree/remote.go b/internal/rtree/remote.go
index 0c4e880..0c4e880 100644
--- a/pkg/rtree/remote.go
+++ b/internal/rtree/remote.go
diff --git a/pkg/rtree/repo.go b/internal/rtree/repo.go
index 790db92..4af51c1 100644
--- a/pkg/rtree/repo.go
+++ b/internal/rtree/repo.go
@@ -25,7 +25,7 @@ import (
"regexp"
"strings"
- "github.com/majewsky/gofu/pkg/cli"
+ "github.com/majewsky/gofu/internal/cli"
)
//Repo describes the entry for a repository in the index file.
diff --git a/pkg/rtree/shared_test.go b/internal/rtree/shared_test.go
index 3dadcec..6720b1c 100644
--- a/pkg/rtree/shared_test.go
+++ b/internal/rtree/shared_test.go
@@ -30,7 +30,7 @@ import (
"strings"
"testing"
- "github.com/majewsky/gofu/pkg/cli"
+ "github.com/majewsky/gofu/internal/cli"
yaml "gopkg.in/yaml.v2"
)
diff --git a/main.go b/main.go
index 4a79ed9..252fa18 100644
--- a/main.go
+++ b/main.go
@@ -23,9 +23,9 @@ import (
"os"
"path/filepath"
- "github.com/majewsky/gofu/pkg/i3status"
- "github.com/majewsky/gofu/pkg/prompt"
- "github.com/majewsky/gofu/pkg/rtree"
+ "github.com/majewsky/gofu/internal/i3status"
+ "github.com/majewsky/gofu/internal/prompt"
+ "github.com/majewsky/gofu/internal/rtree"
)
func main() {