Skip to content

Commit 32d5f0f

Browse files
committed
rename pkg -> internal
for mockery, sqlc, protobuf, makefile
1 parent a9f6ddb commit 32d5f0f

File tree

5 files changed

+557
-556
lines changed

5 files changed

+557
-556
lines changed

.mockery.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,29 @@ inpackage: true
44
dir: "{{.InterfaceDir}}"
55
filename: "mock_{{.InterfaceNameSnake}}.go"
66
packages:
7-
github.com/nais/device/pkg/apiserver/auth:
7+
github.com/nais/device/internal/apiserver/auth:
88
interfaces:
99
SessionStore:
10-
github.com/nais/device/pkg/apiserver/bucket:
10+
github.com/nais/device/internal/apiserver/bucket:
1111
interfaces:
1212
Client:
1313
Object:
14-
github.com/nais/device/pkg/apiserver/database:
14+
github.com/nais/device/internal/apiserver/database:
1515
interfaces:
1616
APIServer:
17-
github.com/nais/device/pkg/pb:
17+
github.com/nais/device/internal/pb:
1818
interfaces:
1919
APIServerClient:
2020
APIServer_GetGatewayConfigurationClient:
21-
github.com/nais/device/pkg/wireguard:
21+
github.com/nais/device/internal/wireguard:
2222
interfaces:
2323
NetworkConfigurer:
24-
github.com/nais/device/pkg/notify:
24+
github.com/nais/device/internal/notify:
2525
interfaces:
2626
Notifier:
27-
github.com/nais/device/pkg/device-agent/runtimeconfig:
27+
github.com/nais/device/internal/device-agent/runtimeconfig:
2828
interfaces:
2929
RuntimeConfig:
30-
github.com/nais/device/pkg/helper:
30+
github.com/nais/device/internal/helper:
3131
interfaces:
3232
OSConfigurator:

Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
LAST_COMMIT = $(shell git --no-pager log -1 --pretty=%h)
44
VERSION := $(shell date "+%Y-%m-%d-%H%M%S")
5-
LDFLAGS := -X github.com/nais/device/pkg/version.Revision=$(shell git rev-parse --short HEAD) -X github.com/nais/device/pkg/version.Version=$(VERSION)
5+
LDFLAGS := -X github.com/nais/device/internal/version.Revision=$(shell git rev-parse --short HEAD) -X github.com/nais/device/internal/version.Version=$(VERSION)
66
PKGID = io.nais.device
77
GOPATH ?= ~/go
88
GOTAGS ?=
@@ -13,7 +13,7 @@ all: test
1313
clients: linux-client macos-client windows-client
1414

1515
proto: install-protobuf-go
16-
${PROTOC} --go-grpc_opt=paths=source_relative --go_opt=paths=source_relative --go_out=. --go-grpc_out=. pkg/pb/protobuf-api.proto
16+
${PROTOC} --go-grpc_opt=paths=source_relative --go_opt=paths=source_relative --go_out=. --go-grpc_out=. internal/pb/protobuf-api.proto
1717

1818
install-protobuf-go:
1919
go install google.golang.org/protobuf/cmd/protoc-gen-go
@@ -172,7 +172,7 @@ clean:
172172

173173
mocks:
174174
go run github.com/vektra/mockery/v2
175-
find pkg -type f -name "mock_*.go" -exec go run mvdan.cc/gofumpt -w {} \;
175+
find internal -type f -name "mock_*.go" -exec go run mvdan.cc/gofumpt -w {} \;
176176

177177
# controlplane is autoreleased for every push
178178
release-frontend:
@@ -189,7 +189,7 @@ buildreleaseauthserver:
189189

190190
generate-sqlc:
191191
go run github.com/sqlc-dev/sqlc/cmd/sqlc generate
192-
go run mvdan.cc/gofumpt -w ./pkg/apiserver/sqlc/
192+
go run mvdan.cc/gofumpt -w ./internal/apiserver/sqlc/
193193

194194
fmt:
195195
go run mvdan.cc/gofumpt -w ./

0 commit comments

Comments
 (0)