feat: import services and standardize Go 1.26.5

This commit is contained in:
2026-08-09 10:43:45 +08:00
parent 689c74b28f
commit 86024fa81d
1456 changed files with 220765 additions and 2 deletions

View File

@@ -0,0 +1,32 @@
filebeat.inputs:
- type: log
enabled: true
# 开启json解析
json.keys_under_root: true
json.add_error_key: true
# 日志文件路径
paths:
- ./logs/cloud/error.log
- ./logs/cloud/slow.log
setup.template.settings:
index.number_of_shards: 1
# 定义kafka topic field
fields:
log_topic: scf.cloud.dev
# 输出到kafka
output.kafka:
hosts: ["127.0.0.1:9092"]
topic: '%{[fields.log_topic]}'
partition.round_robin:
reachable_only: false
required_acks: 1
keep_alive: 10s
# ================================= Processors =================================
processors:
- decode_json_fields:
fields: ['@timestamp','level','content','trace','span','duration']
target: ""

View File

@@ -0,0 +1,5 @@
#install
go install github.com/securego/gosec/v2/cmd/gosec@latest
#run
gosec -fmt=json -out=./test/lint/gosec.json ./...

View File

@@ -0,0 +1,10 @@
# 由于goctl 不能编译多个proto文件所以先要安装合并工具
# go install git.apinb.com/bsm-tools/proto-merge@v0.0.3
# 1. 先合并
proto-merge ./proto/*.proto ./proto/passport.mproto
# 2. goctl 生成代码至/gen
goctl rpc protoc ./proto/passport.mproto --go_out=./pb --go-grpc_out=./pb --zrpc_out=./gen/ -m --style go_zero
#protoc --go_out=./pb/ --go_opt=paths=source_relative --go-grpc_out=./pb/ --go-grpc_opt=require_unimplemented_servers=false --go-grpc_opt=paths=source_relative ./proto/*.proto --proto_path=./proto/

View File

@@ -0,0 +1,7 @@
git pull
go get all
go get -u ./...
go mod tidy
git add .
git commit -m 'run ./script/update.sh'
git push