[agent-automation] Add Makefile and .gitignore for Go development
This commit is contained in:
parent
e72ef6ae87
commit
c524d8c139
2 changed files with 44 additions and 0 deletions
27
.gitignore
vendored
Normal file
27
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
# Binaries
|
||||||
|
*.exe
|
||||||
|
*.exe~
|
||||||
|
*.dll
|
||||||
|
*.so
|
||||||
|
*.dylib
|
||||||
|
|
||||||
|
# Test binary
|
||||||
|
*.test
|
||||||
|
|
||||||
|
# Output of the go coverage tool
|
||||||
|
*.out
|
||||||
|
|
||||||
|
# Dependency directories
|
||||||
|
vendor/
|
||||||
|
|
||||||
|
# Go build cache
|
||||||
|
$(GOPATH)/pkg/
|
||||||
|
|
||||||
|
# Build artifacts
|
||||||
|
build/
|
||||||
|
|
||||||
|
# IDE
|
||||||
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
17
Makefile
Normal file
17
Makefile
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
.PHONY: build run test clean
|
||||||
|
|
||||||
|
APP_NAME := testbed2
|
||||||
|
BUILD_DIR := build
|
||||||
|
|
||||||
|
build:
|
||||||
|
go build -o $(BUILD_DIR)/$(APP_NAME) ./cmd/$(APP_NAME)
|
||||||
|
|
||||||
|
run: build
|
||||||
|
./$(BUILD_DIR)/$(APP_NAME)
|
||||||
|
|
||||||
|
test:
|
||||||
|
go test ./...
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf $(BUILD_DIR)
|
||||||
|
go clean -cache
|
||||||
Loading…
Reference in a new issue