// Info for Typedef.
321322
func (t *Typedef) Info() DefinitionInfo {
	return DefinitionInfo{Name: t.Name, Line: t.Line}
}
263382
func (c *configCommand) Info() *cmd.Info {
	info := &cmd.Info{
		Args:    "[<model-key>[=<value>] ...]",
		Name:    "model-config",
		Purpose: modelConfigSummary,
	}
	if details, err := c.modelConfigDetails(); err == nil {
		if output, err := formatGlobalModelConfigDetails(details); err == nil {
			info.Doc = fmt.Sprintf("%s%s\n%s%s",
				modelConfigHelpDocPartOne,
				modelConfigHelpDocKeys,
				output,
				modelConfigHelpDocPartTwo)
			return info
		}
	}
	info.Doc = fmt.Sprintf("%s%s",
		modelConfigHelpDocPartOne,
		modelConfigHelpDocPartTwo)
	return jujucmd.Info(info)
}
866675
func (c *CharmResourcesCommand) Info() *cmd.Info {
	i := c.baseInfo()
	i.Name = "charm-resources"
	i.Aliases = []string{"list-charm-resources"}
	return jujucmd.Info(i)
}
539042
func (parser *Parser) ParseDefinitions() {
	// sort the typeNames so that parsing definitions is deterministic
	typeNames := make([]string, 0, len(parser.registerTypes))
	for refTypeName := range parser.registerTypes {
		typeNames = append(typeNames, refTypeName)
	}
	sort.Strings(typeNames)

	for _, refTypeName := range typeNames {
		typeSpec := parser.registerTypes[refTypeName]
		ss := strings.Split(refTypeName, ".")
		pkgName := ss[0]
		parser.structStack = nil
		parser.ParseDefinition(pkgName, typeSpec.Name.Name, typeSpec)
	}
}
1254849
func (t *TypedefSpec) Link(scope Scope) (TypeSpec, error) {
	if t.linked() {
		return t, nil
	}

	var err error
	t.Target, err = t.Target.Link(scope)
	if err == nil {
		t.root = RootTypeSpec(t.Target)
	}
	return t, err
}
874626
func (l *CompositeLogger) Info(v ...interface{}) {
	for _, log := range l.loggers {
		log.Info(v...)
	}
}
345742
func (self *Contact) Info(handle string) (*ContactInformation, error) {
	var res map[string]interface{}

	var params []interface{}
	if handle == "" {
		params = []interface{}{self.Key}
	} else {
		params = []interface{}{self.Key, handle}
	}
	if err := self.Call("contact.info", params, &res); err != nil {
		return nil, err
	}
	return toContactInformation(res), nil
}
74336
func (c *HyperClient) Info() (*types.InfoResponse, error) {
	info, err := c.client.Info(
		c.ctx,
		&types.InfoRequest{},
	)

	if err != nil {
		return nil, err
	}

	return info, nil
}
899983
func (c *importFilesystemCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "import-filesystem",
		Purpose: "Imports a filesystem into the model.",
		Doc:     importFilesystemCommandDoc,
		Args:    importFilesystemCommandAgs,
	})
}
114143
func (t Term) TypeOf(args ...interface{}) Term {
	return constructMethodTerm(t, "TypeOf", p.Term_TYPE_OF, args, map[string]interface{}{})
}
81693
func TypeInfo(t *Type) (TypeName, TypeRef, string) {
	switch t.Variant {
	case TypeVariantAliasTypeDef:
		td := t.AliasTypeDef
		return td.Name, td.Type, td.Comment
	case TypeVariantStringTypeDef:
		td := t.StringTypeDef
		return td.Name, td.Type, td.Comment
	case TypeVariantNumberTypeDef:
		td := t.NumberTypeDef
		return td.Name, td.Type, td.Comment
	case TypeVariantArrayTypeDef:
		td := t.ArrayTypeDef
		return td.Name, td.Type, td.Comment
	case TypeVariantMapTypeDef:
		td := t.MapTypeDef
		return td.Name, td.Type, td.Comment
	case TypeVariantStructTypeDef:
		td := t.StructTypeDef
		return td.Name, td.Type, td.Comment
	case TypeVariantBytesTypeDef:
		td := t.BytesTypeDef
		return td.Name, td.Type, td.Comment
	case TypeVariantEnumTypeDef:
		td := t.EnumTypeDef
		return td.Name, td.Type, td.Comment
	case TypeVariantUnionTypeDef:
		td := t.UnionTypeDef
		return td.Name, td.Type, td.Comment
	case TypeVariantBaseType:
		td := t.BaseType
		s := namesBaseType[int(*td)]
		return TypeName(s), TypeRef(s), ""
	default:
		panic("whoops")
	}
}
467726
func NewTypeDef(init ...*TypeDef) *TypeDef {
	var o *TypeDef
	if len(init) == 1 {
		o = init[0]
	} else {
		o = new(TypeDef)
	}
	return o
}
781420
func (c *context) Info(format string, args ...interface{}) {
	c.logger.Info(c.prefixFormat()+format, args...)
}
897309
func TypeDefinition(g Generator, spec compile.TypeSpec) error {
	switch s := spec.(type) {
	case *compile.EnumSpec:
		return enum(g, s)
	case *compile.StructSpec:
		return structure(g, s)
	case *compile.TypedefSpec:
		return typedef(g, s)
	default:
		panic(fmt.Sprintf("%q is not a defined type", spec.ThriftName()))
	}
}
1308859
func Infof(format string, v ...interface{}) {
	std.Fprint(std.flags, LEVEL_INFO, 2, fmt.Sprintf(format, v...), nil)
}
1191659
func (registry TypeRegistry) GetTypeOf(typeName string) reflect.Type {
	if structType, exists := registry.namedType[typeName]; exists {
		return reflect.PtrTo(structType)
	}
	return nil
}
852259
func getTypeInfo(typ reflect.Type) (*typeInfo, error) {
	tinfoLock.RLock()
	tinfo, ok := tinfoMap[typ]
	tinfoLock.RUnlock()
	if ok {
		return tinfo, nil
	}
	tinfo = &typeInfo{}
	if typ.Kind() == reflect.Struct && typ != nameType {
		n := typ.NumField()
		for i := 0; i < n; i++ {
			f := typ.Field(i)
			if f.PkgPath != "" || f.Tag.Get("xml") == "-" {
				continue // Private field
			}

			// For embedded structs, embed its fields.
			if f.Anonymous {
				t := f.Type
				if t.Kind() == reflect.Ptr {
					t = t.Elem()
				}
				if t.Kind() == reflect.Struct {
					inner, err := getTypeInfo(t)
					if err != nil {
						return nil, err
					}
					if tinfo.xmlname == nil {
						tinfo.xmlname = inner.xmlname
					}
					for _, finfo := range inner.fields {
						finfo.idx = append([]int{i}, finfo.idx...)
						if err := addFieldInfo(typ, tinfo, &finfo); err != nil {
							return nil, err
						}
					}
					continue
				}
			}

			finfo, err := structFieldInfo(typ, &f)
			if err != nil {
				return nil, err
			}

			if f.Name == "XMLName" {
				tinfo.xmlname = finfo
				continue
			}

			// Add the field if it doesn't conflict with other fields.
			if err := addFieldInfo(typ, tinfo, finfo); err != nil {
				return nil, err
			}
		}
	}
	tinfoLock.Lock()
	tinfoMap[typ] = tinfo
	tinfoLock.Unlock()
	return tinfo, nil
}