Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc #12

Merged
merged 2 commits into from
Jul 26, 2023
Merged

Misc #12

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -34,3 +27,10 @@ watch: ##
.PHONY: help
help: ## Show this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down
8 changes: 4 additions & 4 deletions example/.geniveev.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down
Loading