diff --git a/api/README.md b/api/README.md index b7ec2f8c0..eb8347b6f 100644 --- a/api/README.md +++ b/api/README.md @@ -2,9 +2,11 @@ ## Getting Started -Install [golangci-lint](https://github.com/golangci/golangci-lint). - -Install [swag](https://github.com/swaggo/swag). +Prerequisites: +- [golangci-lint](https://github.com/golangci/golangci-lint) +- [gci](https://github.com/daixiang0/gci) +- [gofumpt](https://github.com/mvdan/gofumpt) +- [swag](https://github.com/swaggo/swag) Run for development: @@ -24,20 +26,26 @@ Lint code: golangci-lint run ``` -Build Docker image: +Format code: ```shell -docker build -t voltaserve/api . +gci write -s standard -s default \ + -s "prefix(github.com/kouprlabs)" \ + -s "prefix(github.com/kouprlabs/voltaserve/api)" . && \ +gofumpt -w . && \ +gofmt -s -w . && \ +goimports -w . && \ +swag fmt ``` -## Generate Documentation - -Format swag comments: +Build Docker image: ```shell -swag fmt +docker build -t voltaserve/api . ``` +## Generate Documentation + Generate `swagger.yml`: ```shell diff --git a/conversion/README.md b/conversion/README.md index ed3c56c46..c24609e0d 100644 --- a/conversion/README.md +++ b/conversion/README.md @@ -1,8 +1,10 @@ # Voltaserve Conversion -Install [golangci-lint](https://github.com/golangci/golangci-lint). - -Install [swag](https://github.com/swaggo/swag). +Prerequisites: +- [golangci-lint](https://github.com/golangci/golangci-lint) +- [gci](https://github.com/daixiang0/gci) +- [gofumpt](https://github.com/mvdan/gofumpt) +- [swag](https://github.com/swaggo/swag) Run for development: @@ -22,20 +24,25 @@ Lint code: golangci-lint run ``` -Build Docker image: +Format code: ```shell -docker build -t voltaserve/conversion . +gci write -s standard -s default \ + -s "prefix(github.com/kouprlabs)" \ + -s "prefix(github.com/kouprlabs/voltaserve/conversion)" . && \ +gofumpt -w . && \ +gofmt -s -w . && \ +goimports -w . ``` -## Generate Documentation - -Format swag comments: +Build Docker image: ```shell -swag fmt +docker build -t voltaserve/conversion . ``` +## Generate Documentation + Generate `swagger.yml`: ```shell diff --git a/mosaic/README.md b/mosaic/README.md index 3af133a41..98cdbec71 100644 --- a/mosaic/README.md +++ b/mosaic/README.md @@ -1,8 +1,10 @@ # Voltaserve Mosaic -Install [golangci-lint](https://github.com/golangci/golangci-lint). - -Install [swag](https://github.com/swaggo/swag). +Prerequisites: +- [golangci-lint](https://github.com/golangci/golangci-lint) +- [gci](https://github.com/daixiang0/gci) +- [gofumpt](https://github.com/mvdan/gofumpt) +- [swag](https://github.com/swaggo/swag) Run for development: @@ -22,20 +24,26 @@ Lint code: golangci-lint run ``` -Build Docker image: +Format code: ```shell -docker build -t voltaserve/mosaic . +gci write -s standard -s default \ + -s "prefix(github.com/kouprlabs)" \ + -s "prefix(github.com/kouprlabs/voltaserve/mosaic)" . && \ +gofumpt -w . && \ +gofmt -s -w . && \ +goimports -w . && \ +swag fmt ``` -## Generate Documentation - -Format swag comments: +Build Docker image: ```shell -swag fmt +docker build -t voltaserve/mosaic . ``` +## Generate Documentation + Generate `swagger.yml`: ```shell diff --git a/webdav/README.md b/webdav/README.md index ba718dabe..99370a820 100644 --- a/webdav/README.md +++ b/webdav/README.md @@ -1,8 +1,10 @@ # Voltaserve WebDAV -Install [golangci-lint](https://github.com/golangci/golangci-lint). - -Install [swag](https://github.com/swaggo/swag). +Prerequisites: +- [golangci-lint](https://github.com/golangci/golangci-lint) +- [gci](https://github.com/daixiang0/gci) +- [gofumpt](https://github.com/mvdan/gofumpt) +- [swag](https://github.com/swaggo/swag) Run for development: @@ -22,6 +24,17 @@ Lint code: golangci-lint run ``` +Format code: + +```shell +gci write -s standard -s default \ + -s "prefix(github.com/kouprlabs)" \ + -s "prefix(github.com/kouprlabs/voltaserve/webdav)" . && \ +gofumpt -w . && \ +gofmt -s -w . && \ +goimports -w . +``` + Build Docker image: ```shell