func Load(
	path string,
	resource interface{},
	opts ...interface{},
) error {
	var unmarshaller Unmarshaller
	var requireFile bool = true
	for _, opt := range opts {
		switch opt := opt.(type) {
		case func([]byte, interface{}) error:
			unmarshaller = opt
		case Unmarshaller:
			unmarshaller = opt
		case RequireFile:
			requireFile = bool(opt)
		}
	}
	if unmarshaller == nil {
		unmarshaller = DefaultUnmarshaller
	}
	data, err := ioutil.ReadFile(path)
	if err != nil {
		if os.IsNotExist(err) && requireFile {
			return err
		}
	}
	err = unmarshaller(data, resource)
	if err != nil {
		return err
	}
	err = validate(resource, true)
	if err != nil {
		return err
	}
	return nil
}
Load resource data from specified file. unmarshaller variable can be passed
if you want to use custom unmarshaller, by default will be used
DefaultUnmarshaller (toml.Unmarshal)
package ko
import (
	"fmt"
	"io/ioutil"
	"os"
	"reflect"
	"strings"
	"github.com/go-yaml/yaml"
	"github.com/iancoleman/strcase"
	"github.com/kovetskiy/toml"
	"github.com/reconquest/karma-go"
)
type (
	Unmarshaller func([]byte, interface{}) error
)
var DefaultUnmarshaller Unmarshaller = toml.Unmarshal
type (
	RequireFile bool
)