template-go

command module
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

README

template-go

Synopsis

The template-go repository serves as a starting point for new repositories hosting Go code. It also shows best practices that can be retro-fitted into existing repositories hosting Go code.

Go Reference Go Report Card go-test.yaml License

Overview

Aspects of the template-go repository:

  1. Badges: Example badges can be seen above.
  2. Makefile: Simplifies development lifecycle commands.
  3. Sample code: main.go and examplepackage code examples.
  4. Sample test cases: *_test.go files showing how to write and document test cases.
  5. Sample documentation: Documentation style conducive to the Go Package library.
  6. Dockerfile: Containerizing the Go program.
  7. RPM/DEB builds: Using package.Dockerfile to build RPM and DEB files for installation.
  8. .github/workflows: GitActions tailored to Go programming.
  9. .github/dependabot.yml Specifications for keeping Go dependencies up-to-date.

Use

(TODO:)

References

  1. API documentation
  2. Development
  3. Errors
  4. Examples
  5. Related artifacts:
    1. DockerHub
    2. Helm Chart

Documentation

Overview

One or two sentence synopsys of the module. The Senzing XXXX module is...

Overview

One or two paragraph overview of this module...

(This page describes the nature of the entire Go module or the top-level command, not an individual package.)

More information at https://github.com/senzing/template-go

Example Package

The example package gives an example layout for a package. This includes how documentation, tests, and examples should be done. This paragraph (or two) should provide a brief overview while linking the reader to the documentation included in the package itself.

More information can be found in the pkg/github.com/senzing/template-go/examplepackage documentation.

Another Header: Package or other module features...

More details about the module... Lorem ipsum dolor sit amet, consectetur adipiscing elit...

Examples

The examples given here should show a holistic view of the module, if appropriate.

Examples of use can be seen in the main_test.go files.

package main
import (
	fmt

	"github.com/senzing/template-go/examplepackage"
	"github.com/senzing/template-go/anotherpackage"
)

func main() {
	ctx := context.TODO()
	testObject := &ExamplePackageImpl{
		Something: "I'm here",
	}
	err := testObject.SaySomething(ctx)
	if err != nil {
		fmt.Println("whoops")
	}
	anotherpackage.DoSomething(ctx)...
}

Directories

Path Synopsis
The cmd package is used for Cobra integration.
The cmd package is used for Cobra integration.
One or two sentence synopsis of the package...
One or two sentence synopsis of the package...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL