func Register(patternName string, pattern string) error {
	patternFileName := patternName + ".json"
	if _, ok := patternMap[patternFileName]; !ok {
		patternMap[patternFileName] = []byte(pattern)
	}
	return nil
}
Registers a pattern
package microgateway
import (
	"encoding/json"
	"fmt"
	"github.com/project-flogo/microgateway/api"
	"github.com/project-flogo/microgateway/internal/pattern"
)
var patternMap = make(map[string][]byte)
func init() {
	patterns := []string{"DefaultChannelPattern", "DefaultHttpPattern"}
	for i := range patterns {
		patternName := patterns[i] + ".json"
		JSON, err := pattern.Asset(patternName)
		if err != nil {
			fmt.Println("Error from Asset function")
		}
		patternMap[patternName] = JSON
	}
}
func Load(pattern string) (*api.Microgateway, error) {
	patternJSON := []byte{}
	patternJSON = getPattern(pattern)
	pDef := &api.Microgateway{}
	err := json.Unmarshal(patternJSON, pDef)
	if err != nil {
		return nil, err
	}
	return pDef, nil
}