Example Go
Example using the standard Go package
genmod automatically creates a new Go module, registers it in go.work, and updates the directories list in dependabot configuration.
Usage:
-
From any directory in the repository, run:
$ ./genmod.sh <directory_name>
-
The specified directory will be created and its go.mod initialized.
-
The new module will be added to go.work and the gomod directories list in .github/dependabot.yml will be updated.