examplepackage

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

The example package is used to...

Synopsis

The examplepackage package is...

Overview

(This page describes the nature of the individual package.)

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

Another Header

Lorem ipsum dolor sit amet, consectetur adipiscing elit...

Examples

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

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

type ExamplePackage interface {
	SaySomething(ctx context.Context) error
}

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

Jump to

Keyboard shortcuts

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