Documentation

Overview

    Package geterrors is used build a list of missing values to reduce error checking.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    This section is empty.

    Types

    type ErrGetter

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

      ErrGetter has a get function and an array of missing keys for get calls.

      func WrapFunc

      func WrapFunc(get func(string) string) ErrGetter

        WrapFunc takes a function for getting values.

        Returns an ErrGetter.

        func (*ErrGetter) Err

        func (g *ErrGetter) Err(message string) error

          Err takes a message.

          Returns an error string prepended with a message and a list of the missing keys.

          func (*ErrGetter) Get

          func (g *ErrGetter) Get(key string) string

            Get takes a key value and uses the function from the WrapFunc method. If the key is missing it makes a slice of missing keys.

            Source Files