register

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Register

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

Register is a struct binds name and interface such as Constructor

func NewRegister

func NewRegister() *Register

NewRegister returns a new register

func (*Register) Get

func (r *Register) Get(name string) interface{}

Get returns an interface registered with the given name

func (*Register) Register

func (r *Register) Register(name string, v interface{})

Register binds name and interface It will panic if name already exists

Jump to

Keyboard shortcuts

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