Implement reflection and list facets
This commit is contained in:
9
Makefile
9
Makefile
@ -1,5 +1,7 @@
|
||||
# Variables
|
||||
CLIENT_PKG := ./cmd/eia-client
|
||||
CLIENT_GEN_FILE := ./api/eiaapi.gen.go
|
||||
GO_FORMATTER := gofumpt
|
||||
|
||||
.PHONY: all generate build install clean
|
||||
|
||||
@ -9,6 +11,11 @@ all: generate build
|
||||
# Generate code
|
||||
generate:
|
||||
go generate ./...
|
||||
# Fix errors in generated code
|
||||
sed -E -i '' 's/Total[[:space:]]+\*int/Total *string/g' $(CLIENT_GEN_FILE)
|
||||
sed -E -i '' 's/Command[[:space:]]+\*\[\]string/Command *string/g' $(CLIENT_GEN_FILE)
|
||||
# Pretty it up
|
||||
$(GO_FORMATTER) -w $(CLIENT_GEN_FILE)
|
||||
|
||||
# Build the client command binary
|
||||
build: generate
|
||||
@ -16,7 +23,7 @@ build: generate
|
||||
|
||||
# Install the client command binary
|
||||
install: generate
|
||||
go install $(CLIENT_PKG)
|
||||
go install -v $(CLIENT_PKG)
|
||||
|
||||
# Clean up generated files and build artifacts
|
||||
clean:
|
||||
|
Reference in New Issue
Block a user