// interface iseq.MetaW
180112
func (p *PList) WithMeta(meta iseq.PMap) iseq.MetaW {
	return NewPListMeta1N(meta, p.first, p.rest, p.count)
}
1337068
func (a *AdjacencyMatrixAggregation) Meta(metaData map[string]interface{}) *AdjacencyMatrixAggregation {
	a.meta = metaData
	return a
}
1249555
func (a *SumAggregation) Meta(metaData map[string]interface{}) *SumAggregation {
	a.meta = metaData
	return a
}
655338
func (a *NestedAggregation) Meta(metaData map[string]interface{}) *NestedAggregation {
	a.meta = metaData
	return a
}
400852
func (ctx *context) IsWWW() bool {
	host := ctx.Host()
	if index := strings.IndexByte(host, '.'); index > 0 {
		// if it has a subdomain and it's www then return true.
		if subdomain := host[0:index]; !strings.Contains(ctx.Application().ConfigurationReadOnly().GetVHost(), subdomain) {
			return subdomain == "www"
		}
	}
	return false
}
1134653
func isMetadataDir(path, tld string) bool {
	return strings.HasPrefix(path, filepath.Join(tld, "META-INF"))
}
846235
func (c *Cepgo) Meta() (map[string]string, error) {
	rawMeta, err := c.Key("/meta/")
	if err != nil {
		return nil, err
	}

	return typeAssertToMapOfStrings(rawMeta)
}
682298
func (a *FilterAggregation) Meta(metaData map[string]interface{}) *FilterAggregation {
	a.meta = metaData
	return a
}
440359
func (a *SignificantTextAggregation) Meta(metaData map[string]interface{}) *SignificantTextAggregation {
	a.meta = metaData
	return a
}
163780
func (a *AvgBucketAggregation) Meta(metaData map[string]interface{}) *AvgBucketAggregation {
	a.meta = metaData
	return a
}
722753
func (c *Cons) WithMeta(meta iseq.PMap) iseq.MetaW {
	return NewConsM(meta, c.first, c.more)
}
510648
func (a *TermsAggregation) Meta(metaData map[string]interface{}) *TermsAggregation {
	a.meta = metaData
	return a
}
232553
func MetaField(l *State, index int, event string) bool {
	if !l.MetaTable(index) {
		return false
	}
	l.PushString(event)
	l.RawGet(-2)
	if l.IsNil(-1) {
		l.Pop(2) // remove metatable and metafield
		return false
	}
	l.Remove(-2) // remove only metatable
	return true
}
1136512
func isEqCrossStructField(fl FieldLevel) bool {

	field := fl.Field()
	kind := field.Kind()

	topField, topKind, ok := fl.GetStructFieldOK()
	if !ok || topKind != kind {
		return false
	}

	switch kind {

	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
		return topField.Int() == field.Int()

	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
		return topField.Uint() == field.Uint()

	case reflect.Float32, reflect.Float64:
		return topField.Float() == field.Float()

	case reflect.Slice, reflect.Map, reflect.Array:
		return int64(topField.Len()) == int64(field.Len())

	case reflect.Struct:

		fieldType := field.Type()

		// Not Same underlying type i.e. struct and time
		if fieldType != topField.Type() {
			return false
		}

		if fieldType == timeType {

			t := field.Interface().(time.Time)
			fieldTime := topField.Interface().(time.Time)

			return fieldTime.Equal(t)
		}
	}

	// default reflect.String:
	return topField.String() == field.String()
}
509190
func (t *Torrent) Metainfo() metainfo.MetaInfo {
	t.cl.lock()
	defer t.cl.unlock()
	return t.newMetaInfo()
}
1131948
func (a *MovAvgAggregation) Meta(metaData map[string]interface{}) *MovAvgAggregation {
	a.meta = metaData
	return a
}
1251293
func (db *DB) meta() *meta {
	// We have to return the meta with the highest txid which doesn't fail
	// validation. Otherwise, we can cause errors when in fact the database is
	// in a consistent state. metaA is the one with the higher txid.
	metaA := db.meta0
	metaB := db.meta1
	if db.meta1.txid > db.meta0.txid {
		metaA = db.meta1
		metaB = db.meta0
	}

	// Use higher meta page if valid. Otherwise fallback to previous, if valid.
	if err := metaA.validate(); err == nil {
		return metaA
	} else if err := metaB.validate(); err == nil {
		return metaB
	}

	// This should never be reached, because both meta1 and meta0 were validated
	// on mmap() and we do fsync() on every write.
	panic("bolt.DB.meta(): invalid meta pages")
}