Add sample-simple, presubmit check
5 files changed
tree: 107553ddef00ab808425ae9f01dd0d20cbf1a10f
  1. sample-simple/
  2. subcommandstest/
  3. .gitignore
  4. LICENSE
  5. presubmit.py
  6. README.md
  7. subcommands.go
README.md

subcommands golang library

This package permits a Go application to implement subcommands support similar to what is supported by the ‘go’ tool.

The library is designed so that the test cases can run concurrently. Using global flags variables is discouraged to keep your program testable conccurently.

Documentation

  • See the GoDoc
  • See sample-simple for a barebone sample skeleton usable as-is.
  • See module subcommands/subcommandstest for tools to help testing an application using subcommands. One of the main benefit is t.Parallel() just works, because subcommands help wrapping global variables.