// ------------------------------------------------------------------
164610
func smatSetupFunc(ctx smat.Context) (next smat.State, err error) {
	return smatRunning, nil
}
712451
func (ini *INI) GetComments(section, key string) []string {
	sec := ini.getSection(section)

	if sec == nil {
		return nil
	}
	if key == "" {
		return sec.Comments
	}

	if item := sec.getItem(key, ini.isCaseSensitive); item != nil {
		return item.Comments
	}

	return nil
}
1341049
func (s *LoadBalancerService) GetLoadBalancerID(name string, opts ...OptionFunc) (string, int, error) {
	p := &ListLoadBalancersParams{}
	p.p = make(map[string]interface{})

	p.p["name"] = name

	for _, fn := range append(s.cs.options, opts...) {
		if err := fn(s.cs, p); err != nil {
			return "", -1, err
		}
	}

	l, err := s.ListLoadBalancers(p)
	if err != nil {
		return "", -1, err
	}

	if l.Count == 0 {
		return "", l.Count, fmt.Errorf("No match found for %s: %+v", name, l)
	}

	if l.Count == 1 {
		return l.LoadBalancers[0].Id, l.Count, nil
	}

	if l.Count > 1 {
		for _, v := range l.LoadBalancers {
			if v.Name == name {
				return v.Id, l.Count, nil
			}
		}
	}
	return "", l.Count, fmt.Errorf("Could not find an exact match for %s: %+v", name, l)
}
791269
func (s *i18nSorter) Less(i, j int) bool {

	iValue := strings.ToLower(s.getComparisonValueFunc(s.toBeSorted[i]))
	jValue := strings.ToLower(s.getComparisonValueFunc(s.toBeSorted[j]))

	// if it's a local sort, use the collator
	if s.collator != nil {
		return s.collator.CompareString(iValue, jValue) == -1
	}

	// for universal sorts, normalize the unicode to sort
	normalizer := norm.NFKD
	iValue = normalizer.String(iValue)
	jValue = normalizer.String(jValue)

	return bytes.Compare([]byte(iValue), []byte(jValue)) == -1
}
472385
func (gbi *groupByIterator) nextAtIdx(i int) {
	// loop until we find a non-empty row. This is an optimization - the loop and if/break can be removed.
	for {
		nr, rowID, wrapped := gbi.rowIters[i].Next()
		if nr == nil {
			gbi.done = true
			return
		}
		if wrapped && i != 0 {
			gbi.nextAtIdx(i - 1)
		}
		if i == 0 && gbi.filter != nil {
			gbi.rows[i].row = nr.Intersect(gbi.filter)
		} else if i == 0 || i == len(gbi.rows)-1 {
			gbi.rows[i].row = nr
		} else {
			gbi.rows[i].row = nr.Intersect(gbi.rows[i-1].row)
		}
		gbi.rows[i].id = rowID

		if !gbi.rows[i].row.IsEmpty() {
			break
		}
	}
}
694638
func main() {
	staticFields := make(map[string]interface{})
	staticFields["foo"] = "bar"
	baseDir := ""

	if wd, err := os.Getwd(); err != nil {
		log.Fatal(err)
	} else {
		baseDir = wd
	}

	config := bunyan.Config{
		Name: "app",
		Streams: []bunyan.Stream{
			{
				Stream: os.Stdout,
			},
			{
				Path:  filepath.Join(baseDir, "info.log"),
				Level: bunyan.LogLevelInfo,
			},
			{
				Path:  filepath.Join(baseDir, "error.log"),
				Level: bunyan.LogLevelError,
			},
		},
		StaticFields: staticFields,
	}

	if l, err := bunyan.CreateLogger(config); err != nil {
		log.Fatal(err)
	} else {
		chStatic := make(map[string]interface{})
		chStatic["baz"] = "stuff"
		c := l.Child(chStatic)

		l.Info("i am the parent %d", 100)
		c.Info("i am the child")
		l.Error(errors.New("oh no!!!"), "what happened %s", "???")
	}
}
1370269
func init() {

	RegisterPluralSpec([]string{"bm", "bo", "dz", "id", "ig", "ii", "in", "ja", "jbo", "jv", "jw", "kde", "kea", "km", "ko", "lkt", "lo", "ms", "my", "nqo", "root", "sah", "ses", "sg", "th", "to", "vi", "wo", "yo", "yue", "zh"}, &PluralSpec{
		Plurals: newPluralSet(Other),
		PluralFunc: func(ops *Operands) Plural {
			return Other
		},
	})
	RegisterPluralSpec([]string{"am", "as", "bn", "fa", "gu", "hi", "kn", "mr", "zu"}, &PluralSpec{
		Plurals: newPluralSet(One, Other),
		PluralFunc: func(ops *Operands) Plural {
			// i = 0 or n = 1
			if intEqualsAny(ops.I, 0) ||
				ops.NequalsAny(1) {
				return One
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"ff", "fr", "hy", "kab"}, &PluralSpec{
		Plurals: newPluralSet(One, Other),
		PluralFunc: func(ops *Operands) Plural {
			// i = 0,1
			if intEqualsAny(ops.I, 0, 1) {
				return One
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"pt"}, &PluralSpec{
		Plurals: newPluralSet(One, Other),
		PluralFunc: func(ops *Operands) Plural {
			// i = 0..1
			if intInRange(ops.I, 0, 1) {
				return One
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"ast", "ca", "de", "en", "et", "fi", "fy", "gl", "it", "ji", "nl", "sv", "sw", "ur", "yi"}, &PluralSpec{
		Plurals: newPluralSet(One, Other),
		PluralFunc: func(ops *Operands) Plural {
			// i = 1 and v = 0
			if intEqualsAny(ops.I, 1) && intEqualsAny(ops.V, 0) {
				return One
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"si"}, &PluralSpec{
		Plurals: newPluralSet(One, Other),
		PluralFunc: func(ops *Operands) Plural {
			// n = 0,1 or i = 0 and f = 1
			if ops.NequalsAny(0, 1) ||
				intEqualsAny(ops.I, 0) && intEqualsAny(ops.F, 1) {
				return One
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"ak", "bh", "guw", "ln", "mg", "nso", "pa", "ti", "wa"}, &PluralSpec{
		Plurals: newPluralSet(One, Other),
		PluralFunc: func(ops *Operands) Plural {
			// n = 0..1
			if ops.NinRange(0, 1) {
				return One
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"tzm"}, &PluralSpec{
		Plurals: newPluralSet(One, Other),
		PluralFunc: func(ops *Operands) Plural {
			// n = 0..1 or n = 11..99
			if ops.NinRange(0, 1) ||
				ops.NinRange(11, 99) {
				return One
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"af", "asa", "az", "bem", "bez", "bg", "brx", "ce", "cgg", "chr", "ckb", "dv", "ee", "el", "eo", "es", "eu", "fo", "fur", "gsw", "ha", "haw", "hu", "jgo", "jmc", "ka", "kaj", "kcg", "kk", "kkj", "kl", "ks", "ksb", "ku", "ky", "lb", "lg", "mas", "mgo", "ml", "mn", "nah", "nb", "nd", "ne", "nn", "nnh", "no", "nr", "ny", "nyn", "om", "or", "os", "pap", "ps", "rm", "rof", "rwk", "saq", "sdh", "seh", "sn", "so", "sq", "ss", "ssy", "st", "syr", "ta", "te", "teo", "tig", "tk", "tn", "tr", "ts", "ug", "uz", "ve", "vo", "vun", "wae", "xh", "xog"}, &PluralSpec{
		Plurals: newPluralSet(One, Other),
		PluralFunc: func(ops *Operands) Plural {
			// n = 1
			if ops.NequalsAny(1) {
				return One
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"da"}, &PluralSpec{
		Plurals: newPluralSet(One, Other),
		PluralFunc: func(ops *Operands) Plural {
			// n = 1 or t != 0 and i = 0,1
			if ops.NequalsAny(1) ||
				!intEqualsAny(ops.T, 0) && intEqualsAny(ops.I, 0, 1) {
				return One
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"is"}, &PluralSpec{
		Plurals: newPluralSet(One, Other),
		PluralFunc: func(ops *Operands) Plural {
			// t = 0 and i % 10 = 1 and i % 100 != 11 or t != 0
			if intEqualsAny(ops.T, 0) && intEqualsAny(ops.I%10, 1) && !intEqualsAny(ops.I%100, 11) ||
				!intEqualsAny(ops.T, 0) {
				return One
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"mk"}, &PluralSpec{
		Plurals: newPluralSet(One, Other),
		PluralFunc: func(ops *Operands) Plural {
			// v = 0 and i % 10 = 1 or f % 10 = 1
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%10, 1) ||
				intEqualsAny(ops.F%10, 1) {
				return One
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"fil", "tl"}, &PluralSpec{
		Plurals: newPluralSet(One, Other),
		PluralFunc: func(ops *Operands) Plural {
			// v = 0 and i = 1,2,3 or v = 0 and i % 10 != 4,6,9 or v != 0 and f % 10 != 4,6,9
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I, 1, 2, 3) ||
				intEqualsAny(ops.V, 0) && !intEqualsAny(ops.I%10, 4, 6, 9) ||
				!intEqualsAny(ops.V, 0) && !intEqualsAny(ops.F%10, 4, 6, 9) {
				return One
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"lv", "prg"}, &PluralSpec{
		Plurals: newPluralSet(Zero, One, Other),
		PluralFunc: func(ops *Operands) Plural {
			// n % 10 = 0 or n % 100 = 11..19 or v = 2 and f % 100 = 11..19
			if ops.NmodEqualsAny(10, 0) ||
				ops.NmodInRange(100, 11, 19) ||
				intEqualsAny(ops.V, 2) && intInRange(ops.F%100, 11, 19) {
				return Zero
			}
			// n % 10 = 1 and n % 100 != 11 or v = 2 and f % 10 = 1 and f % 100 != 11 or v != 2 and f % 10 = 1
			if ops.NmodEqualsAny(10, 1) && !ops.NmodEqualsAny(100, 11) ||
				intEqualsAny(ops.V, 2) && intEqualsAny(ops.F%10, 1) && !intEqualsAny(ops.F%100, 11) ||
				!intEqualsAny(ops.V, 2) && intEqualsAny(ops.F%10, 1) {
				return One
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"lag"}, &PluralSpec{
		Plurals: newPluralSet(Zero, One, Other),
		PluralFunc: func(ops *Operands) Plural {
			// n = 0
			if ops.NequalsAny(0) {
				return Zero
			}
			// i = 0,1 and n != 0
			if intEqualsAny(ops.I, 0, 1) && !ops.NequalsAny(0) {
				return One
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"ksh"}, &PluralSpec{
		Plurals: newPluralSet(Zero, One, Other),
		PluralFunc: func(ops *Operands) Plural {
			// n = 0
			if ops.NequalsAny(0) {
				return Zero
			}
			// n = 1
			if ops.NequalsAny(1) {
				return One
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"iu", "kw", "naq", "se", "sma", "smi", "smj", "smn", "sms"}, &PluralSpec{
		Plurals: newPluralSet(One, Two, Other),
		PluralFunc: func(ops *Operands) Plural {
			// n = 1
			if ops.NequalsAny(1) {
				return One
			}
			// n = 2
			if ops.NequalsAny(2) {
				return Two
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"shi"}, &PluralSpec{
		Plurals: newPluralSet(One, Few, Other),
		PluralFunc: func(ops *Operands) Plural {
			// i = 0 or n = 1
			if intEqualsAny(ops.I, 0) ||
				ops.NequalsAny(1) {
				return One
			}
			// n = 2..10
			if ops.NinRange(2, 10) {
				return Few
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"mo", "ro"}, &PluralSpec{
		Plurals: newPluralSet(One, Few, Other),
		PluralFunc: func(ops *Operands) Plural {
			// i = 1 and v = 0
			if intEqualsAny(ops.I, 1) && intEqualsAny(ops.V, 0) {
				return One
			}
			// v != 0 or n = 0 or n != 1 and n % 100 = 1..19
			if !intEqualsAny(ops.V, 0) ||
				ops.NequalsAny(0) ||
				!ops.NequalsAny(1) && ops.NmodInRange(100, 1, 19) {
				return Few
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"bs", "hr", "sh", "sr"}, &PluralSpec{
		Plurals: newPluralSet(One, Few, Other),
		PluralFunc: func(ops *Operands) Plural {
			// v = 0 and i % 10 = 1 and i % 100 != 11 or f % 10 = 1 and f % 100 != 11
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%10, 1) && !intEqualsAny(ops.I%100, 11) ||
				intEqualsAny(ops.F%10, 1) && !intEqualsAny(ops.F%100, 11) {
				return One
			}
			// v = 0 and i % 10 = 2..4 and i % 100 != 12..14 or f % 10 = 2..4 and f % 100 != 12..14
			if intEqualsAny(ops.V, 0) && intInRange(ops.I%10, 2, 4) && !intInRange(ops.I%100, 12, 14) ||
				intInRange(ops.F%10, 2, 4) && !intInRange(ops.F%100, 12, 14) {
				return Few
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"gd"}, &PluralSpec{
		Plurals: newPluralSet(One, Two, Few, Other),
		PluralFunc: func(ops *Operands) Plural {
			// n = 1,11
			if ops.NequalsAny(1, 11) {
				return One
			}
			// n = 2,12
			if ops.NequalsAny(2, 12) {
				return Two
			}
			// n = 3..10,13..19
			if ops.NinRange(3, 10) || ops.NinRange(13, 19) {
				return Few
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"sl"}, &PluralSpec{
		Plurals: newPluralSet(One, Two, Few, Other),
		PluralFunc: func(ops *Operands) Plural {
			// v = 0 and i % 100 = 1
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%100, 1) {
				return One
			}
			// v = 0 and i % 100 = 2
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%100, 2) {
				return Two
			}
			// v = 0 and i % 100 = 3..4 or v != 0
			if intEqualsAny(ops.V, 0) && intInRange(ops.I%100, 3, 4) ||
				!intEqualsAny(ops.V, 0) {
				return Few
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"dsb", "hsb"}, &PluralSpec{
		Plurals: newPluralSet(One, Two, Few, Other),
		PluralFunc: func(ops *Operands) Plural {
			// v = 0 and i % 100 = 1 or f % 100 = 1
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%100, 1) ||
				intEqualsAny(ops.F%100, 1) {
				return One
			}
			// v = 0 and i % 100 = 2 or f % 100 = 2
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%100, 2) ||
				intEqualsAny(ops.F%100, 2) {
				return Two
			}
			// v = 0 and i % 100 = 3..4 or f % 100 = 3..4
			if intEqualsAny(ops.V, 0) && intInRange(ops.I%100, 3, 4) ||
				intInRange(ops.F%100, 3, 4) {
				return Few
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"he", "iw"}, &PluralSpec{
		Plurals: newPluralSet(One, Two, Many, Other),
		PluralFunc: func(ops *Operands) Plural {
			// i = 1 and v = 0
			if intEqualsAny(ops.I, 1) && intEqualsAny(ops.V, 0) {
				return One
			}
			// i = 2 and v = 0
			if intEqualsAny(ops.I, 2) && intEqualsAny(ops.V, 0) {
				return Two
			}
			// v = 0 and n != 0..10 and n % 10 = 0
			if intEqualsAny(ops.V, 0) && !ops.NinRange(0, 10) && ops.NmodEqualsAny(10, 0) {
				return Many
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"cs", "sk"}, &PluralSpec{
		Plurals: newPluralSet(One, Few, Many, Other),
		PluralFunc: func(ops *Operands) Plural {
			// i = 1 and v = 0
			if intEqualsAny(ops.I, 1) && intEqualsAny(ops.V, 0) {
				return One
			}
			// i = 2..4 and v = 0
			if intInRange(ops.I, 2, 4) && intEqualsAny(ops.V, 0) {
				return Few
			}
			// v != 0
			if !intEqualsAny(ops.V, 0) {
				return Many
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"pl"}, &PluralSpec{
		Plurals: newPluralSet(One, Few, Many, Other),
		PluralFunc: func(ops *Operands) Plural {
			// i = 1 and v = 0
			if intEqualsAny(ops.I, 1) && intEqualsAny(ops.V, 0) {
				return One
			}
			// v = 0 and i % 10 = 2..4 and i % 100 != 12..14
			if intEqualsAny(ops.V, 0) && intInRange(ops.I%10, 2, 4) && !intInRange(ops.I%100, 12, 14) {
				return Few
			}
			// v = 0 and i != 1 and i % 10 = 0..1 or v = 0 and i % 10 = 5..9 or v = 0 and i % 100 = 12..14
			if intEqualsAny(ops.V, 0) && !intEqualsAny(ops.I, 1) && intInRange(ops.I%10, 0, 1) ||
				intEqualsAny(ops.V, 0) && intInRange(ops.I%10, 5, 9) ||
				intEqualsAny(ops.V, 0) && intInRange(ops.I%100, 12, 14) {
				return Many
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"be"}, &PluralSpec{
		Plurals: newPluralSet(One, Few, Many, Other),
		PluralFunc: func(ops *Operands) Plural {
			// n % 10 = 1 and n % 100 != 11
			if ops.NmodEqualsAny(10, 1) && !ops.NmodEqualsAny(100, 11) {
				return One
			}
			// n % 10 = 2..4 and n % 100 != 12..14
			if ops.NmodInRange(10, 2, 4) && !ops.NmodInRange(100, 12, 14) {
				return Few
			}
			// n % 10 = 0 or n % 10 = 5..9 or n % 100 = 11..14
			if ops.NmodEqualsAny(10, 0) ||
				ops.NmodInRange(10, 5, 9) ||
				ops.NmodInRange(100, 11, 14) {
				return Many
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"lt"}, &PluralSpec{
		Plurals: newPluralSet(One, Few, Many, Other),
		PluralFunc: func(ops *Operands) Plural {
			// n % 10 = 1 and n % 100 != 11..19
			if ops.NmodEqualsAny(10, 1) && !ops.NmodInRange(100, 11, 19) {
				return One
			}
			// n % 10 = 2..9 and n % 100 != 11..19
			if ops.NmodInRange(10, 2, 9) && !ops.NmodInRange(100, 11, 19) {
				return Few
			}
			// f != 0
			if !intEqualsAny(ops.F, 0) {
				return Many
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"mt"}, &PluralSpec{
		Plurals: newPluralSet(One, Few, Many, Other),
		PluralFunc: func(ops *Operands) Plural {
			// n = 1
			if ops.NequalsAny(1) {
				return One
			}
			// n = 0 or n % 100 = 2..10
			if ops.NequalsAny(0) ||
				ops.NmodInRange(100, 2, 10) {
				return Few
			}
			// n % 100 = 11..19
			if ops.NmodInRange(100, 11, 19) {
				return Many
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"ru", "uk"}, &PluralSpec{
		Plurals: newPluralSet(One, Few, Many, Other),
		PluralFunc: func(ops *Operands) Plural {
			// v = 0 and i % 10 = 1 and i % 100 != 11
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%10, 1) && !intEqualsAny(ops.I%100, 11) {
				return One
			}
			// v = 0 and i % 10 = 2..4 and i % 100 != 12..14
			if intEqualsAny(ops.V, 0) && intInRange(ops.I%10, 2, 4) && !intInRange(ops.I%100, 12, 14) {
				return Few
			}
			// v = 0 and i % 10 = 0 or v = 0 and i % 10 = 5..9 or v = 0 and i % 100 = 11..14
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%10, 0) ||
				intEqualsAny(ops.V, 0) && intInRange(ops.I%10, 5, 9) ||
				intEqualsAny(ops.V, 0) && intInRange(ops.I%100, 11, 14) {
				return Many
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"br"}, &PluralSpec{
		Plurals: newPluralSet(One, Two, Few, Many, Other),
		PluralFunc: func(ops *Operands) Plural {
			// n % 10 = 1 and n % 100 != 11,71,91
			if ops.NmodEqualsAny(10, 1) && !ops.NmodEqualsAny(100, 11, 71, 91) {
				return One
			}
			// n % 10 = 2 and n % 100 != 12,72,92
			if ops.NmodEqualsAny(10, 2) && !ops.NmodEqualsAny(100, 12, 72, 92) {
				return Two
			}
			// n % 10 = 3..4,9 and n % 100 != 10..19,70..79,90..99
			if (ops.NmodInRange(10, 3, 4) || ops.NmodEqualsAny(10, 9)) && !(ops.NmodInRange(100, 10, 19) || ops.NmodInRange(100, 70, 79) || ops.NmodInRange(100, 90, 99)) {
				return Few
			}
			// n != 0 and n % 1000000 = 0
			if !ops.NequalsAny(0) && ops.NmodEqualsAny(1000000, 0) {
				return Many
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"ga"}, &PluralSpec{
		Plurals: newPluralSet(One, Two, Few, Many, Other),
		PluralFunc: func(ops *Operands) Plural {
			// n = 1
			if ops.NequalsAny(1) {
				return One
			}
			// n = 2
			if ops.NequalsAny(2) {
				return Two
			}
			// n = 3..6
			if ops.NinRange(3, 6) {
				return Few
			}
			// n = 7..10
			if ops.NinRange(7, 10) {
				return Many
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"gv"}, &PluralSpec{
		Plurals: newPluralSet(One, Two, Few, Many, Other),
		PluralFunc: func(ops *Operands) Plural {
			// v = 0 and i % 10 = 1
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%10, 1) {
				return One
			}
			// v = 0 and i % 10 = 2
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%10, 2) {
				return Two
			}
			// v = 0 and i % 100 = 0,20,40,60,80
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%100, 0, 20, 40, 60, 80) {
				return Few
			}
			// v != 0
			if !intEqualsAny(ops.V, 0) {
				return Many
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"ar", "ars"}, &PluralSpec{
		Plurals: newPluralSet(Zero, One, Two, Few, Many, Other),
		PluralFunc: func(ops *Operands) Plural {
			// n = 0
			if ops.NequalsAny(0) {
				return Zero
			}
			// n = 1
			if ops.NequalsAny(1) {
				return One
			}
			// n = 2
			if ops.NequalsAny(2) {
				return Two
			}
			// n % 100 = 3..10
			if ops.NmodInRange(100, 3, 10) {
				return Few
			}
			// n % 100 = 11..99
			if ops.NmodInRange(100, 11, 99) {
				return Many
			}
			return Other
		},
	})
	RegisterPluralSpec([]string{"cy"}, &PluralSpec{
		Plurals: newPluralSet(Zero, One, Two, Few, Many, Other),
		PluralFunc: func(ops *Operands) Plural {
			// n = 0
			if ops.NequalsAny(0) {
				return Zero
			}
			// n = 1
			if ops.NequalsAny(1) {
				return One
			}
			// n = 2
			if ops.NequalsAny(2) {
				return Two
			}
			// n = 3
			if ops.NequalsAny(3) {
				return Few
			}
			// n = 6
			if ops.NequalsAny(6) {
				return Many
			}
			return Other
		},
	})
}
55873
func main() {
	svc := stringService{}

	natsURL := flag.String("nats-url", nats.DefaultURL, "URL for connection to NATS")
	flag.Parse()

	nc, err := nats.Connect(*natsURL)
	if err != nil {
		log.Fatal(err)
	}
	defer nc.Close()

	uppercaseHTTPHandler := httptransport.NewServer(
		makeUppercaseHTTPEndpoint(nc),
		decodeUppercaseHTTPRequest,
		httptransport.EncodeJSONResponse,
	)

	countHTTPHandler := httptransport.NewServer(
		makeCountHTTPEndpoint(nc),
		decodeCountHTTPRequest,
		httptransport.EncodeJSONResponse,
	)

	uppercaseHandler := natstransport.NewSubscriber(
		makeUppercaseEndpoint(svc),
		decodeUppercaseRequest,
		natstransport.EncodeJSONResponse,
	)

	countHandler := natstransport.NewSubscriber(
		makeCountEndpoint(svc),
		decodeCountRequest,
		natstransport.EncodeJSONResponse,
	)

	uSub, err := nc.QueueSubscribe("stringsvc.uppercase", "stringsvc", uppercaseHandler.ServeMsg(nc))
	if err != nil {
		log.Fatal(err)
	}
	defer uSub.Unsubscribe()

	cSub, err := nc.QueueSubscribe("stringsvc.count", "stringsvc", countHandler.ServeMsg(nc))
	if err != nil {
		log.Fatal(err)
	}
	defer cSub.Unsubscribe()

	http.Handle("/uppercase", uppercaseHTTPHandler)
	http.Handle("/count", countHTTPHandler)
	log.Fatal(http.ListenAndServe(":8080", nil))

}
1071986
func (row *Row) Init() {
	// Initial values
	row.insertColumnLength = len(row.PK) + len(row.Fields)
	row.updateColumnLength = len(row.PK) + len(row.Fields)
	row.pkColumns = make([]string, 0)
	row.pkValues = make([]interface{}, 0)
	row.insertColumns = make([]string, 0)
	row.updateColumns = make([]string, 0)
	row.insertValues = make([]interface{}, 0)
	row.updateValues = make([]interface{}, 0)

	// Get and sort map keys
	var i int
	pkKeys := make([]string, len(row.PK))
	i = 0
	for pkKey := range row.PK {
		pkKeys[i] = pkKey
		i++
	}
	sort.Strings(pkKeys)
	fieldKeys := make([]string, len(row.Fields))
	i = 0
	for fieldKey := range row.Fields {
		fieldKeys[i] = fieldKey
		i++
	}
	sort.Strings(fieldKeys)

	// Primary keys
	for _, pkKey := range pkKeys {
		row.pkColumns = append(row.pkColumns, pkKey)
		row.pkValues = append(row.pkValues, row.PK[pkKey])
		row.insertColumns = append(row.insertColumns, pkKey)
		row.updateColumns = append(row.updateColumns, pkKey)
		row.insertValues = append(row.insertValues, row.PK[pkKey])
		row.updateValues = append(row.updateValues, row.PK[pkKey])
	}

	// Rest of the fields
	for _, fieldKey := range fieldKeys {
		sv, ok := row.Fields[fieldKey].(string)
		if ok && sv == onInsertNow {
			row.insertColumns = append(row.insertColumns, fieldKey)
			row.insertValues = append(row.insertValues, time.Now())
			row.updateColumnLength--
			continue
		}
		if ok && sv == onUpdateNow {
			row.updateColumns = append(row.updateColumns, fieldKey)
			row.updateValues = append(row.updateValues, time.Now())
			row.insertColumnLength--
			continue
		}
		row.insertColumns = append(row.insertColumns, fieldKey)
		row.updateColumns = append(row.updateColumns, fieldKey)
		row.insertValues = append(row.insertValues, row.Fields[fieldKey])
		row.updateValues = append(row.updateValues, row.Fields[fieldKey])
	}
}
714227
func (c ColumnElem) In(args interface{}) BinaryClause {
	// Create the inner array clause and parameters
	a := ArrayClause{Clauses: make([]Clause, 0), Sep: ", "}

	// Use reflect to get arguments from the interface only if it is a slice
	s := reflect.ValueOf(args)
	switch s.Kind() {
	case reflect.Slice:
		for i := 0; i < s.Len(); i++ {
			a.Clauses = append(a.Clauses, &Parameter{s.Index(i).Interface()})
		}
	}
	// TODO What if something other than a slice is given?
	// TODO This statement should be able to take clauses / subqueries
	return BinaryClause{
		Pre:  c,
		Post: FuncClause{Inner: a},
		Sep:  " IN ",
	}
}
1117443
func Tr(lang, format string, args ...interface{}) string {
	var section string

	idx := strings.IndexByte(format, '.')
	if idx > 0 {
		section = format[:idx]
		format = format[idx+1:]
	}

	value, ok := locales.Get(lang, section, format)
	if ok {
		format = value
	}

	if len(args) > 0 {
		params := make([]interface{}, 0, len(args))
		for _, arg := range args {
			if arg == nil {
				continue
			}

			val := reflect.ValueOf(arg)
			if val.Kind() == reflect.Slice {
				for i := 0; i < val.Len(); i++ {
					params = append(params, val.Index(i).Interface())
				}
			} else {
				params = append(params, arg)
			}
		}
		return fmt.Sprintf(format, params...)
	}
	return format
}
658443
func init() {
	var err error
	validTagRe, err = regexp.Compile(`^([a-z][a-z0-9]*(\-[a-z0-9]+)*)(:([a-z0-9]+(\-[a-z0-9]+)*))*$`)
	if err != nil {
		panic(err)
	}
}
1188399
func Subscribers() string {
	subs := make(map[string]bool) // no duplicates

	// get tags all clients subscribed to
	for i := range subscribers {
		s := subscribers[i].subscriptions.ToSlice()
		for j := range s {
			for k := range s[j] {
				subs[s[j][k]] = true
			}
		}
	}

	// slice it
	subSlice := []string{}
	for k, _ := range subs {
		subSlice = append(subSlice, k)
	}

	return strings.Join(subSlice, " ")
}
83108
func init() {
	Skins.db = make(map[string]Skin)

	Skins.AddSkin("default", Skin{
		Up: &SkinDirection{
			Head: "  ╚⊙ ⊙╝  ",
			Pede: []string{"╚═(███)═╝"},
		},
		Down: &SkinDirection{
			Head: "  ╔⊙ ⊙╗  ",
			Pede: []string{"╔═(███)═╗"},
		},
	})

	Skins.AddSkin("frozen", Skin{
		Up: &SkinDirection{
			Head: "  ╚⊙ ⊙╝  ",
			Pede: []string{"╚═(❄❄❄)═╝"},
			Tail: "    ❄    ",
		},
		Down: &SkinDirection{
			Head: "  ╔⊙ ⊙╗  ",
			Pede: []string{"╔═(❄❄❄)═╗"},
			Tail: "    ❄    ",
		},
	})

	Skins.AddSkin("diagonals", Skin{
		Up: &SkinDirection{
			Head: "  ╚⊙ ⊙╝  ",
			Pede: []string{"\\/(███)\\/", "/\\(███)/\\"},
		},
		Down: &SkinDirection{
			Head: "  ╔⊙ ⊙╗  ",
			Pede: []string{"/\\(███)/\\", "\\/(███)\\/"},
		},
	})

	Skins.AddSkin("corporate", Skin{
		Up: &SkinDirection{
			Head: "  ╚⊙ ⊙╝  ",
			Pede: []string{"╚═(©©©)═╝"},
		},
		Down: &SkinDirection{
			Head: "  ╔⊙ ⊙╗  ",
			Pede: []string{"╔═(©©©)═╗"},
		},
	})

	Skins.AddSkin("love", Skin{
		Up: &SkinDirection{
			Head: "  ╚⊙ ⊙╝  ",
			Pede: []string{"╚═(♥♥♥)═╝"},
		},
		Down: &SkinDirection{
			Head: "  ╔⊙ ⊙╗  ",
			Pede: []string{"╔═(♥♥♥)═╗"},
		},
	})

	Skins.AddSkin("musician", Skin{
		Up: &SkinDirection{
			Head: "  ╚⊙ ⊙╝  ",
			Pede: []string{"╚═(♫♩♬)═╝"},
		},
		Down: &SkinDirection{
			Head: "  ╔⊙ ⊙╗  ",
			Pede: []string{"╔═(♫♩♬)═╗"},
		},
	})

	Skins.AddSkin("bocal", Skin{
		Up: &SkinDirection{
			Head: "  ╚⊙ ⊙╝  ",
			Pede: []string{"╚═(🐟🐟🐟)═╝"},
		},
		Down: &SkinDirection{
			Head: "  ╔⊙ ⊙╗  ",
			Pede: []string{"╔═(🐟🐟🐟)═╗"},
		},
	})

	Skins.AddSkin("ascii", Skin{
		Up: &SkinDirection{
			Head: "  \\o o/  ",
			Pede: []string{"|=(###)=|"},
		},
		Down: &SkinDirection{
			Head: "  /o o\\  ",
			Pede: []string{"|=(###)=|"},
		},
	})

	Skins.AddSkin("inception", Skin{
		Up: &SkinDirection{
			Head: "    👀    ",
			Pede: []string{"╚═(🐛🐛🐛)═╝"},
		},
		Down: &SkinDirection{
			Head: "    👀    ",
			Pede: []string{"╔═(🐛🐛🐛)═╗"},
		},
	})

	Skins.AddSkin("humancentipede", Skin{
		Up: &SkinDirection{
			Head: "    👀    ",
			Pede: []string{"╚═(😷😷😷)═╝"},
		},
		Down: &SkinDirection{
			Head: "    👀    ",
			Pede: []string{"╔═(😷😷😷)═╗"},
		},
	})

	Skins.AddSkin("finger", Skin{
		Up: &SkinDirection{
			Head: "    👀    ",
			Pede: []string{"👈~~~  ~~~👉"},
		},
		Down: &SkinDirection{
			Head: "    👀    ",
			Pede: []string{"👈~~~~~~~~👉"},
		},
	})

	Skins.AddSkin("handy", Skin{
		Up: &SkinDirection{
			Head: "    👀    ",
			Pede: []string{"╚═(👌👌👌)═╝"},
		},
		Down: &SkinDirection{
			Head: "    👀    ",
			Pede: []string{"╔═(👌👌👌)═╗"},
		},
	})

	Skins.AddSkin("human", Skin{
		Up: &SkinDirection{
			Head: " ( ͡° ͜ʖ ͡°)",
			Pede: []string{"👆 ......👆"},
		},
		Down: &SkinDirection{
			Head: " ( ͡° ͜ʖ ͡°)",
			Pede: []string{"👇 ......👇"},
		},
	})
}
1133796
func (m *Dialect) Init() {
	if m.inited {
		return
	}
	m.inited = true
	for _, s := range m.Statements {
		s.init()
	}
}
968498
func (c *Callbacks) OnCDOTAUserMsg_ReplaceQueryUnit(fn func(*dota.CDOTAUserMsg_ReplaceQueryUnit) error) {
	c.onCDOTAUserMsg_ReplaceQueryUnit = append(c.onCDOTAUserMsg_ReplaceQueryUnit, fn)
}
422037
func (s *LoadBalancerService) GetLoadBalancerRuleByID(id string, opts ...OptionFunc) (*LoadBalancerRule, int, error) {
	p := &ListLoadBalancerRulesParams{}
	p.p = make(map[string]interface{})

	p.p["id"] = id

	for _, fn := range append(s.cs.options, opts...) {
		if err := fn(s.cs, p); err != nil {
			return nil, -1, err
		}
	}

	l, err := s.ListLoadBalancerRules(p)
	if err != nil {
		if strings.Contains(err.Error(), fmt.Sprintf(
			"Invalid parameter id value=%s due to incorrect long value format, "+
				"or entity does not exist", id)) {
			return nil, 0, fmt.Errorf("No match found for %s: %+v", id, l)
		}
		return nil, -1, err
	}

	if l.Count == 0 {
		return nil, l.Count, fmt.Errorf("No match found for %s: %+v", id, l)
	}

	if l.Count == 1 {
		return l.LoadBalancerRules[0], l.Count, nil
	}
	return nil, l.Count, fmt.Errorf("There is more then one result for LoadBalancerRule UUID: %s!", id)
}