go-cmdhelping

command module
v0.1.9 Latest Latest
Warning

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

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

README

go-cmdhelping

⚠ WARNING: go-cmdhelping is still in development ⚠ _

At the moment, this is "work-in-progress" with Semantic Versions of 0.n.x. Although it can be reviewed and commented on, the recommendation is not to use it yet.

Synopsis

go-cmdhelping contains utility packages for working with viper and cobra

Go Reference Go Report Card go-test.yaml License

Overview

go-cmdhelping is an opinionated use of viper and cobra.

Context variables are specified in a list of option.ContextVariable.

The []option.ContextVariable list is processed by functions in the cmdhelper package.

Use

See main.go for an example of use.

References

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/go-cmdhelping

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/go-cmdhelping/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/go-cmdhelping/examplepackage"
	"github.com/senzing/go-cmdhelping/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

Jump to

Keyboard shortcuts

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