_example

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Debug = iota + 1
	Info
	Warn
	Error
	Panic
	Fatal
	Silence
)

Variables

This section is empty.

Functions

func DefaultLogger

func DefaultLogger(writer io.Writer, level Level) *defaultLogger

func Exit

func Exit(code int)

Types

type Level

type Level uint8

type Logger

type Logger interface {
	Debug(m string)
	Info(m string)
	Warn(m string)
	Error(m string)
	Panic(m string)
	Fatal(m string)
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(options ...ServiceOption) *Service

func (*Service) DoSomething

func (s *Service) DoSomething() string

type ServiceOption

type ServiceOption func(*serviceOptions)

func WithArg1

func WithArg1(i int) ServiceOption

func WithArg2

func WithArg2(s string) ServiceOption

func WithArg3

func WithArg3(b bool) ServiceOption

type StubbedExit

type StubbedExit struct {
	Exited   bool
	ExitCode int
	// contains filtered or unexported fields
}

func WithStub

func WithStub(f func()) *StubbedExit

func (*StubbedExit) UnStub

func (s *StubbedExit) UnStub()

Jump to

Keyboard shortcuts

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