diff --git a/Makefile b/Makefile index 8ed3a62..d5647c9 100644 --- a/Makefile +++ b/Makefile @@ -8,13 +8,6 @@ MAKEFLAGS += --no-builtin-rules DATE := $(shell date +"%a %b %d %T %Y") UNAME_S := $(shell uname -s | tr A-Z a-z) -##@ Other - -.PHONY: release -release: ## Push a new release to github - rm -rf dist/ - goreleaser release - ##@ Development .PHONY: build @@ -34,3 +27,10 @@ watch: ## .PHONY: help help: ## Show this help @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) + +##@ Other + +.PHONY: release +release: ## Push a new release to github + rm -rf dist/ + goreleaser release diff --git a/README.md b/README.md index 1a647b4..0b8bf41 100644 --- a/README.md +++ b/README.md @@ -67,15 +67,15 @@ import ( "github.com/bommie/b6/db" ) -type {{.service_name | Title}}Server struct { +type {{.service_name | Title}}Service struct { db *db.DB cfg *config.AuthConfig } -var _ {{.service_name}}v1connect.{{.service_name | Title}}ServiceClient = (*{{.service_name | Title }}Server)(nil) +var _ {{.service_name}}v1connect.{{.service_name | Title}}ServiceClient = (*{{.service_name | Title }}Service)(nil) -func NewServer(_ context.Context, db *db.DB, cfg *config.AuthConfig) *{{.service_name | Title }}Server { - return &{{.service_name | Title}}Server{ +func NewService(_ context.Context, db *db.DB, cfg *config.AuthConfig) *{{.service_name | Title }}Service { + return &{{.service_name | Title}}Service{ db: db, cfg: cfg, } diff --git a/example/.geniveev.toml b/example/.geniveev.toml index fc5872e..1218baf 100644 --- a/example/.geniveev.toml +++ b/example/.geniveev.toml @@ -28,15 +28,15 @@ import ( "github.com/bommie/b6/db" ) -type {{.service_name | Title}}Server struct { +type {{.service_name | Title}}Service struct { db *db.DB cfg *config.AuthConfig } -var _ {{.service_name}}v1connect.{{.service_name | Title}}ServiceClient = (*{{.service_name | Title }}Server)(nil) +var _ {{.service_name}}v1connect.{{.service_name | Title}}ServiceClient = (*{{.service_name | Title }}Service)(nil) -func NewServer(_ context.Context, db *db.DB, cfg *config.AuthConfig) *{{.service_name | Title }}Server { - return &{{.service_name | Title}}Server{ +func NewService(_ context.Context, db *db.DB, cfg *config.AuthConfig) *{{.service_name | Title }}Service { + return &{{.service_name | Title}}Service{ db: db, cfg: cfg, }