// ... and a constructor to make it ...
548839
func NewTracker(mynick string) *stateTracker {
	st := &stateTracker{
		chans: make(map[string]*channel),
		nicks: make(map[string]*nick),
	}
	st.me = newNick(mynick)
	st.nicks[mynick] = st.me
	return st
}
576083
func (c Call) MakeExpr(output *Term) *Expr {
	terms := []*Term(c)
	return NewExpr(append(terms, output))
}
1308165
func (fn _bindFunctionObject) construct(argumentList []Value) Value {
	object := fn.target
	switch value := object.value.(type) {
	case _nativeFunctionObject:
		return value.construct(object, fn.argumentList)
	case _nodeFunctionObject:
		argumentList = append(fn.argumentList, argumentList...)
		return object.construct(argumentList)
	}
	panic(fn.target.runtime.panicTypeError())
}
1276943
func (l *Listener) init() {
	l.Lock()
	defer l.Unlock()
	if l.closing == nil {
		l.closing = make(chan struct{})
	}

	// Initialize l.connc only if the listener is not yet closed.
	select {
	case <-l.closing:
	default:
		if l.connc == nil {
			l.connc = make(chan *Conn)
		}
	}
}
870487
func init() {
	docsProvider := func() map[string]interface{} {
		docs := make(map[string]interface{})

		docs["formats"] = DefaultFormats
		docs["layouts"] = createLayoutExamples()
		return docs
	}

	docshelper.AddDocProvider("output", docsProvider)
}
907291
func Init(h sort.Interface) {
	// heapify
	n := h.Len()
	for i := n/2 - 1; i >= 0; i-- {
		heapDown(n, h.Less, h.Swap, i)
	}
}
132188
func NewAutoProvider(constructor interface{}) Provider {
	fnValue := reflect.ValueOf(constructor)
	if fnValue.Kind() != reflect.Func {
		panic("constructor is not a function")
	}

	fnType := reflect.TypeOf(constructor)
	if fnType.NumOut() != 1 {
		panic("constructor must have exactly 1 return value")
	}

	return autoProvider{
		constructor: constructor,
	}
}
68481
func init() {
	// Starting with 0 time doesn't mean the timer is stopped, so we must
	// explicitly stop the timer.
	t := time.NewTimer(0)
	t.Stop()

	buf := &bytes.Buffer{}
	buf.Grow(bufSize)
	std = &logger{
		buf:     buf,
		timer:   t,
		flusher: fileFlusher{},
	}
	f := os.Getenv(OutEnv)
	if f != "" {
		std.flusher = fileFlusher{f}
	} else {
		std.flusher = stdOutFlusher{}
	}
	if os.Getenv(ColorEnv) == "NO" {
		colorizeEnabled = false
	}
}
251042
func init() {
	for out, _ := range collector.DataOutput {
		collector.DataOutputLib = append(collector.DataOutputLib, out)
	}
	sort.Strings(collector.DataOutputLib)
}
631589
func (l *Loader) init() {
	if l.loading == nil {
		l.loading = stringset.New(1)
		l.sources = make(map[string]string, 1)
		l.symbols = make(map[string]*Struct, 1)
	}
}
709261
func init() {

	docsProvider := func() map[string]interface{} {
		docs := make(map[string]interface{})

		var chromaLexers []interface{}

		sort.Sort(lexers.Registry.Lexers)

		for _, l := range lexers.Registry.Lexers {

			config := l.Config()

			var filenames []string
			filenames = append(filenames, config.Filenames...)
			filenames = append(filenames, config.AliasFilenames...)

			aliases := config.Aliases

			for _, filename := range filenames {
				alias := strings.TrimSpace(strings.TrimPrefix(filepath.Ext(filename), "."))
				if alias != "" {
					aliases = append(aliases, alias)
				}
			}

			sort.Strings(aliases)
			aliases = UniqueStrings(aliases)

			lexerEntry := struct {
				Name    string
				Aliases []string
			}{
				config.Name,
				aliases,
			}

			chromaLexers = append(chromaLexers, lexerEntry)

			docs["lexers"] = chromaLexers
		}
		return docs

	}

	docshelper.AddDocProvider("chroma", docsProvider)
}
260617
func _() {
	var _ Event = (*Absolute)(nil)        // assert *Absolute implements Event
	var _ Event = (*FAbsolute)(nil)       // assert *FAbsolute implements Event
	var _ Event = (*Gauge)(nil)           // assert *Gauge implements Event
	var _ Event = (*FGauge)(nil)          // assert *FGauge implements Event
	var _ Event = (*GaugeDelta)(nil)      // assert *GaugeDelta implements Event
	var _ Event = (*FGaugeDelta)(nil)     // assert *FGaugeDelta implements Event
	var _ Event = (*Increment)(nil)       // assert *Increment implements Event
	var _ Event = (*PrecisionTiming)(nil) // assert *PrecisionTiming implements Event
	var _ Event = (*Timing)(nil)          // assert *Timing implements Event
	var _ Event = (*Total)(nil)           // assert *Total implements Event
}
547737
func init() {
	gob.Register([]interface{}{})
	gob.Register(map[string]interface{}{})
	gob.Register([]map[string]string{})
	gob.Register([]map[string]int{})
	gob.Register(syscall.Signal(0x1))
}
29948
func (metadata *CloudMetadata) construct(valueType reflect.Type) error {
	for _, metadataCatalog := range metadata.Products {
		for _, ItemCollection := range metadataCatalog.Items {
			if err := ItemCollection.construct(valueType); err != nil {
				return err
			}
		}
	}
	return nil
}
1315761
func (c *BitComparator) ConstructPBComparator() (*pb.Comparator, error) {
	if !BitComparatorBitwiseOp(*c.BitwiseOp).isValid() {
		return nil, errors.New("Invalid bitwise operator specified")
	}
	serializedComparator, err := proto.Marshal((*pb.BitComparator)(c))
	if err != nil {
		return nil, err
	}
	comparator := &pb.Comparator{
		Name:                 proto.String(comparatorPath + "BitComparator"),
		SerializedComparator: serializedComparator,
	}
	return comparator, nil
}
1131092
func (c *Constructors) String() string {
	var s string
	for k := range *c {
		s += k.String() + "=>" + "(func() interface {})" + "\t"
	}
	return s
}
47291
func (e *Emitter) Init() {
	e.handlers = make(map[string]EventHandlerFunc)
	e.event = make(chan Event)

	// event handler
	go func() {
		for {
			ev := <-e.event

			if fn, ok := e.handlers[ev.Name]; ok {
				if fn(ev) {
					break
				}
			} else if fn, ok := e.handlers[ALL]; ok {
				if fn(ev) {
					break
				}
			} else {
				if e.verbose {
					log.Println("unhandled Emit", ev)
				}
			}
		}

		close(e.event) // TOFIX: this causes new "emits" to panic.
	}()
}