Documentation
¶
Overview ¶
One or two sentence synopsis of the package...
Overview ¶
One or two paragraph overview of the package... (This page describes the nature of the individual package.)
More information at https://github.com/senzing/template-go
Another Header ¶
Details of the package... Lorem ipsum dolor sit amet, consectetur adipiscing elit...
Examples ¶
The examples given here should be specific to the package.
Examples of use can be seen in the examplepackage_test.go files.
package main
import (
fmt
"github.com/senzing/template-go/examplepackage"
)
func main() {
ctx := context.TODO()
testObject := &ExamplePackageImpl{
Something: "I'm here",
}
err := testObject.SaySomething(ctx)
if err != nil {
fmt.Println("whoops")
}
}
Index ¶
Examples ¶
Constants ¶
View Source
const ExampleConstant = 1
An example constant.
Variables ¶
View Source
var ExampleVariable = map[int]string{
1: "Just a string",
}
An example variable.
Functions ¶
This section is empty.
Types ¶
type ExamplePackage ¶
The ExamplePackage interface is an example interface.
type ExamplePackageImpl ¶
type ExamplePackageImpl struct {
Something string
}
ExamplePackageImpl is an example type-struct.
func (*ExamplePackageImpl) SaySomething ¶
func (examplepackage *ExamplePackageImpl) SaySomething(ctx context.Context) error
The SaySomething method simply prints the 'Something' value in the type-struct.
Input
- ctx: A context to control lifecycle.
Output
- Nothing is returned, except for an error. However, something is printed. See the example output.
Example ¶
// For more information, visit https://github.com/Senzing/template-go/blob/main/examplepackage/examplepackage_test.go
ctx := context.TODO()
examplePackage := &ExamplePackageImpl{
Something: "I'm here",
}
examplePackage.SaySomething(ctx)
Output: examplePackage: I'm here
Click to show internal directories.
Click to hide internal directories.