dev: add gopls/delve to flake, add Makefile for proto/test/build

This commit is contained in:
Graham McIntire 2026-02-15 08:58:13 -06:00
parent ca36ab0c38
commit 33485a0497
2 changed files with 29 additions and 0 deletions

20
Makefile Normal file
View file

@ -0,0 +1,20 @@
.PHONY: proto test build vet lint
proto:
protoc --go_out=. --go_opt=paths=source_relative proto/agent.proto
@# protoc outputs to proto/ due to go_package; move to pb/
mv proto/agent.pb.go pb/agent.pb.go
test:
go test -race -v ./...
build:
go build -o towerops-agent .
vet:
go vet ./...
lint:
golangci-lint run
all: proto vet test build

View file

@ -19,11 +19,20 @@
pkgs.protobuf
pkgs.protoc-gen-go
pkgs.git
pkgs.gopls
pkgs.delve
];
env = {
PROTOC = "${pkgs.protobuf}/bin/protoc";
};
shellHook = ''
echo "towerops-agent dev shell"
echo " go test ./... - run tests"
echo " go build ./... - build"
echo " make proto - regenerate protobuf"
'';
};
});
}