code: func (tl TypeLoader) LoadEnums(args *ArgType) (map[string]*Enum, error) {
  	var err error
  
  	// not supplied, so bail
  	if tl.EnumList == nil {
  		return nil, nil
  	}
  
  	// load enums
  	enumList, err := tl.EnumList(args.DB, args.Schema)
  	if err != nil {
  		return nil, err
  	}
  
  	// process enums
  	enumMap := map[string]*Enum{}
  	for _, e := range enumList {
  		enumTpl := &Enum{
  			Name:              SingularizeIdentifier(e.EnumName),
  			Schema:            args.Schema,
  			Values:            []*EnumValue{},
  			Enum:              e,
  			ReverseConstNames: args.UseReversedEnumConstNames,
  		}
  
  		err = tl.LoadEnumValues(args, enumTpl)
  		if err != nil {
  			return nil, err
  		}
  
  		enumMap[enumTpl.Name] = enumTpl
  		args.KnownTypeMap[enumTpl.Name] = true
  	}
  
  	// generate enum templates
  	for _, e := range enumMap {
  		err = args.ExecuteTemplate(EnumTemplate, e.Name, "", e)
  		if err != nil {
  			return nil, err
  		}
  	}
  
  	return enumMap, nil
  }
docs: // LoadEnums loads schema enums.