1 Star 0 Fork 0

ikaiguang/go-snowflake-node-id

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 839 Bytes
一键复制 编辑 原始数据 按行查看 历史
ikaiguang 提交于 2023-04-12 23:36 . feat 重构节点服务
# 版本信息
GO_VERSION:=$(shell go env GOPATH)
GOPATH:=$(shell go env GOPATH)
GIT_BRANCH=$(shell git branch | grep '*' | awk '{print $$2}')
GIT_VERSION=$(shell git describe --tags --always)
.PHONY: info
info:
@echo "==> GO_VERSION: $(GO_VERSION)"
@echo "==> GOPATH: $(GOPATH)"
@echo "==> GIT_BRANCH: $(GIT_BRANCH)"
@echo "==> GIT_VERSION: $(GIT_VERSION)"
.PHONY: run
run:
go run ./cmd/main/... -conf=./configs
# make api service=xxx
.PHONY: api
api:
go run ./cmd/proto/... -path=./api/${service}
# make config
.PHONY: config
config:
go run ./cmd/proto/... -path=./internal/conf
# ping 请注意端口号
# 注意,请先运行服务
# make run service=admin-service
.PHONY: ping
ping:
curl http://127.0.0.1:8081/api/v1/ping/hello && \
echo "\n" && \
curl http://127.0.0.1:8081/api/v1/ping/error && \
echo "\n"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/ikaiguang/go-snowflake-node-id.git
git@gitee.com:ikaiguang/go-snowflake-node-id.git
ikaiguang
go-snowflake-node-id
go-snowflake-node-id
main

搜索帮助