Skip to content

uded/go-swag-action

 
 

Repository files navigation

Link

Swag tool for golang applications

This action installs swag tool to generate/test your golang application

Features

  • Installing swag tool (by default)
  • Executing swag tool with your parameters. Can generate swagger documentation
  • Comparing generated documentation with commited. Works only for generated docs.go files

Inputs

swagWersion

Required The version of swag tool you want to install. Version is taken from swag releases.

command

Command you want to execute. Command is passed as arguments to swag tool.

equalToGoPath

Specifies a path to docs.go file you want to compare with your commited docs.go file. Commited file is specified by equalToGoOriginPath parameter.

equalToGoOriginPath

Specifies a path to docs.go file commited in the repository. Works only if equalToGoPath option is specified. Default is docs/docs.go.

Example usage

We want to generate docs.go file and compare with commited.

It's an example from current repository. Go project is taken from https://github.com/swaggo/swag/tree/master/example/celler

- uses: yegorrybchenko/[email protected]
  with:
    command: init -d example_test -ot go
    swagWersion: 1.8.1
    equalToGoPath: docs/docs.go
    equalToGoOriginPath: example_test/docs/docs.go

Contributing

  1. Fork the repository
  2. Create new branch
  3. Commit to the new branch
  4. Create new pull request

Building the project

Run build-package before the push

npm run build-package

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 92.9%
  • TypeScript 6.8%
  • JavaScript 0.3%