dfang / mall Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
# go-zero 微服务实战 https://zhuanlan.zhihu.com/p/461604538 常用命令 mkdir -p mall && cd mall && go mod init mkdir -p service && cd service mkdir -p {user,order,pay,product}/{api,rpc,model} cd user goctl model mysql ddl -src ./model/user.sql -dir ./model -c goctl api go -api ./api/user.api -dir ./api goctl rpc protoc rpc/user.proto --go_out=./rpc/pb --go-grpc_out=./rpc/pb --zrpc_out=rpc/ goctl docker --go user.go --port 8000 cd ~/go-zero-demo/mall/service/product/api go mod init github.com/dfang/mall/service/product/api go mod tidy cd ~/go-zero-demo/mall/service/product/rpc go mod init github.com/dfang/mall/service/pay/rpc go mod tidy cd ~/go-zero-demo/mall/service/user/api go mod init github.com/dfang/mall/service/user/api go mod tidy cd ~/go-zero-demo/mall/service/user/rpc go mod init github.com/dfang/mall/service/pay/rpc go mod tidy cd ~/go-zero-demo/mall/service/order/api go mod init github.com/dfang/mall/service/order/api go mod tidy cd ~/go-zero-demo/mall/service/order/rpc go mod init github.com/dfang/mall/service/order/rpc go mod tidy cd ~/go-zero-demo/mall/service/pay/api go mod init github.com/dfang/mall/service/pay/api go mod tidy cd ~/go-zero-demo/mall/service/pay/rpc go mod init github.com/dfang/mall/service/pay/rpc go mod tidy gsed -i 's/search/replace/gI' input.txt # only find word ‘love’ and replace it with ‘sick’ if line content a specific string such as FOO: sed -i -e '/FOO/s/love/sick/' input.txt etcdctl get "" --prefix --keys-only etcdctl --endpoints etcd:2379 get "" --prefix --keys-only unset all proxy on local find . -name captain.yml -execdir captain build \; find . -name captain.yml -execdir sh -c "captain build; captain push" \; ``` λ tree -L 2 service/ service/ ├── order │ ├── api │ ├── captain.yml │ ├── model │ └── rpc ├── pay │ ├── api │ ├── captain.yml │ ├── model │ └── rpc ├── product │ ├── api │ ├── captain.yml │ ├── model │ └── rpc └── user ├── api ├── captain.yml ├── model └── rpc # 进入每个RPC目录执行go mod tidy λ find . -type d -iname rpc -execdir sh -c "cd {}; go mod tidy" \; cd service find . -name go.mod -execdir bash -c "go mod tidy" \; find . -iname .gitignore -execdir bash -c "cat {}; echo" \; find . -iname .gitignore -execdir bash -c "git add {}" \; ```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.