//-------- util ---------------
352226
func convertNSS(nss []core.Namespace) []*rpc.ArrString {
	res := make([]*rpc.ArrString, len(nss))
	for i := range nss {
		var tmp rpc.ArrString
		tmp.S = common.ToNamespace(nss[i])
		res[i] = &tmp
	}
	return res
}
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
		},
	})
}
506650
func (c *Client) Search(args ...string) ([]Attrs, error) {
	return c.Command("search " + quoteArgs(args)).AttrsList("file")
}
765735
func main() {
	var (
		settings         []Option
		settingsTemplate = createTemplate("templates/query_params.go.tmpl")
		filepath         = "../../search/query_params.go"
	)

	for _, opt := range options {
		if isSearch(opt.Kind) {
			settings = append(settings, opt)
		}
	}

	generateFile(settingsTemplate, settings, filepath)
}
429061
func main() {

	const htmlBody = `
<!DOCTYPE html>
<html>
  <head>
    <link href="/hello.css" rel="stylesheet" type="text/css">
  </head>
  <body>
    <h1>Hello, Gear!</h1>
  </body>
</html>`

	const pushBody = `
h1 {
  color: red;
}
`

	app := gear.New()

	app.UseHandler(logging.Default(true))
	app.Use(favicon.New("./testdata/favicon.ico"))

	router := gear.NewRouter()
	router.Get("/", func(ctx *gear.Context) error {
		ctx.Res.Push("/hello.css", &http.PushOptions{Method: "GET"})
		return ctx.HTML(200, htmlBody)
	})
	router.Get("/hello.css", func(ctx *gear.Context) error {
		ctx.Type("text/css")
		return ctx.End(200, []byte(pushBody))
	})
	app.UseHandler(router)
	app.Error(app.ListenTLS(":3000", "./testdata/out/test.crt", "./testdata/out/test.key"))
}
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))
}
227215
func (p *gc_parser) parse_func_decl() (string, *ast.FuncDecl) {
	// "func" was already consumed by lookahead
	name := p.parse_exported_name()
	typ := p.parse_signature()
	if p.tok == '{' {
		p.parse_func_body()
	}
	return name.X.(*ast.Ident).Name, &ast.FuncDecl{
		Name: name.Sel,
		Type: typ,
	}
}
498061
func main() {
	opts := &Options{}
	_, err := flags.Parse(opts)
	if err != nil {
		log.Fatal(err)
	}

	err = config.LoadDotEnvSkipEmpty(os.Getenv("ENV_PATH"), "./.env")
	if err != nil {
		log.Fatal(err)
	}

	apiClient, err := Initialize()
	if err != nil {
		log.Fatal(err)
	}

	req := rc.ExtensionUpdateRequest{
		Contact: rc.ContactInfoUpdateRequest{
			FirstName: opts.FirstName,
			LastName:  opts.LastName}}

	info, resp, err := apiClient.UserSettingsApi.UpdateExtension(
		context.Background(), "~", "~", req)
	if err != nil {
		log.Fatal(err)
	} else if resp.StatusCode >= 300 {
		log.Fatal(fmt.Sprintf("API Status %v", resp.StatusCode))
	}

	fmt.Printf("Status: %v\n", resp.StatusCode)

	fmtutil.PrintJSON(info)

	fmt.Println("DONE")
}
831996
func main() {

	// init a connection
	s, err := solr.Init("localhost", 8983, "collection-name")

	if err != nil {
		fmt.Println(err)
		return
	}

	// define a solr query string
	q := "q=*:*"

	// perform a query    
	res, err := s.SelectRaw(q)

	if err != nil {
		fmt.Println(err)
		return
	}

	// grab results for ease of use later on
	results := res.Results

	// print a summary and loop over results, priting the "title" and "latlng" fields
	fmt.Println(
		fmt.Sprintf("Query: %#v\nHits: %d\nNum Results: %d\nQtime: %d\nStatus: %d\n\nResults\n-------\n",
			q,
			results.NumFound,
			results.Len(),
			res.QTime,
			res.Status))

	for i := 0; i < results.Len(); i++ {
		fmt.Println("Some field:", results.Get(i).Field("id"))
		fmt.Println("Some other field:", results.Get(i).Field("title"))

		fmt.Println("")
	}

}
245954
func main() {
	var keyFile string  // Private key PEM file
	var keyID string    // Key pair ID of CloudFront key pair
	var resource string // CloudFront resource pattern
	var object string   // S3 object frontented by CloudFront

	flag.StringVar(&keyFile, "file", "", "private key file")
	flag.StringVar(&keyID, "id", "", "key pair id")
	flag.StringVar(&resource, "r", "", "resource to request")
	flag.StringVar(&object, "g", "", "object to get")
	flag.Parse()

	// Load the PEM file into memory so it can be used by the signer
	privKey, err := sign.LoadPEMPrivKeyFile(keyFile)
	if err != nil {
		fmt.Println("failed to load key,", err)
		return
	}

	// Create the new CookieSigner to get signed cookies for CloudFront
	// resource requests
	signer := sign.NewCookieSigner(keyID, privKey)

	// Get the cookies for the resource. These will be used
	// to make the requests with
	cookies, err := signer.Sign(resource, time.Now().Add(1*time.Hour))
	if err != nil {
		fmt.Println("failed to sign cookies", err)
		return
	}

	// Use the cookies in a http.Client to show how they allow the client
	// to request resources from CloudFront.
	req, err := http.NewRequest("GET", object, nil)
	fmt.Println("Cookies:")
	for _, c := range cookies {
		fmt.Printf("%s=%s;\n", c.Name, c.Value)
		req.AddCookie(c)
	}

	// Send and handle the response. For a successful response the object's
	// content will be written to stdout. The same process could be applied
	// to a http service written cookies to the response but using
	// http.SetCookie(w, c,) on the ResponseWriter.
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		fmt.Println("failed to send request", err)
		return
	}
	defer resp.Body.Close()

	b, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		fmt.Println("failed to read requested body", err)
		return
	}

	fmt.Println("Response:", resp.Status)
	fmt.Println(string(b))
}
95546
func Init() {
	// Root path is automatically determined from the calling function's source file location.
	// Catch the calling function's source file path.
	_, file, _, _ := runtime.Caller(1)
	// Save the directory alone.
	rootPath = filepath.Dir(file)

	appInfo = make(map[string]string)
}
1373183
func main() {
	statikFS, err := fs.New()
	if err != nil {
		log.Fatal(err)
	}

	http.Handle("/public/", http.StripPrefix("/public/", http.FileServer(statikFS)))
	http.ListenAndServe(":8080", nil)
}
985319
func (u Uintptr) If(fn func(uintptr)) {
	if u.Present() {
		fn(*u.value)
	}
}
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)
}
1215181
func main() {
	rootCmd := cmds.NewCmdOsm()
	dir := runtime.GOPath() + "/src/github.com/appscode/osm/docs/reference"
	fmt.Printf("Generating cli markdown tree in: %v\n", dir)
	err := os.RemoveAll(dir)
	if err != nil {
		log.Fatalln(err)
	}
	err = os.MkdirAll(dir, 0755)
	if err != nil {
		log.Fatalln(err)
	}

	filePrepender := func(filename string) string {
		name := filepath.Base(filename)
		base := strings.TrimSuffix(name, path.Ext(name))
		data := struct {
			ID      string
			Name    string
			Version string
			RootCmd bool
		}{
			strings.Replace(base, "_", "-", -1),
			strings.Title(strings.Replace(base, "_", " ", -1)),
			version,
			!strings.ContainsRune(base, '_'),
		}
		var buf bytes.Buffer
		if err := tplFrontMatter.ExecuteTemplate(&buf, "cmd", data); err != nil {
			log.Fatalln(err)
		}
		return buf.String()
	}

	linkHandler := func(name string) string {
		return "/docs/reference/" + name
	}
	doc.GenMarkdownTreeCustom(rootCmd, dir, filePrepender, linkHandler)

	index := filepath.Join(dir, "_index.md")
	f, err := os.OpenFile(index, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
	if err != nil {
		log.Fatalln(err)
	}
	err = tplFrontMatter.ExecuteTemplate(f, "index", struct{ Version string }{version})
	if err != nil {
		log.Fatalln(err)
	}
	if err := f.Close(); err != nil {
		log.Fatalln(err)
	}
}
938673
func main() {

	// init a connection
	s, err := solr.Init("localhost", 8983, "collection-name")

	if err != nil {
		fmt.Println(err)
		return
	}

	// Build a query object
	// Here we are specifying a 'q' param,
	// rows, faceting and facet.fields
	q := solr.Query{
		Params: solr.URLParamMap{
			"q":           []string{"id:13"},
			"facet.field": []string{"accepts_4x4s", "accepts_bicycles"},
			"facet":       []string{"true"},
		},
		Rows: 10,
	}

	// perform the query, checking for errors
	res, err := s.Select(&q)

	if err != nil {
		fmt.Println(err)
		return
	}

	// grab results for ease of use later on
	results := res.Results

	// print a summary and loop over results, priting the "title" and "latlng" fields
	fmt.Println(
		fmt.Sprintf("Query: %#v\nHits: %d\nNum Results: %d\nQtime: %d\nStatus: %d\n\nResults\n-------\n",
			q,
			results.NumFound,
			results.Len(),
			res.QTime,
			res.Status))

	for i := 0; i < results.Len(); i++ {
		fmt.Println("Some field:", results.Get(i).Field("id"))
		fmt.Println("Some other field:", results.Get(i).Field("title"))

		fmt.Println("")
	}

}
906582
func (g *Generator) typeOf(tt types.Type) string {
	switch t := tt.(type) {
	case *types.Chan:
		return chanPrefixes[t.Dir()] + g.typeOf(t.Elem())
	case *types.Pointer:
		return "*" + g.typeOf(t.Elem())
	case *types.Array:
		return fmt.Sprintf("[%d]%s", t.Len(), g.typeOf(t.Elem()))
	case *types.Slice:
		return "[]" + g.typeOf(t.Elem())
	case *types.Map:
		return "map[" + g.typeOf(t.Key()) + "]" + g.typeOf(t.Elem())
	case *types.Struct:
		name := "struct{\n"
		for i := 0; i < t.NumFields(); i++ {
			field := t.Field(i)
			if !field.Anonymous() {
				name += field.Name()
			}
			name += " " + g.typeOf(field.Type())

			if t.Tag(i) != "" {
				name += fmt.Sprintf(" `%s`\n", t.Tag(i))
			} else {
				name += "\n"
			}
		}
		return name + "\n}"
	case *types.Signature:
		signature, err := g.FuncSignature(t)
		if err != nil {
			log.Fatalf("failed to get func signature: %v", err)
		}

		return "func" + signature
	case *types.Named:
		fullName := t.Obj().Type().String()
		if convertTo, ok := g.typeConversions[fullName]; ok {
			fullName = convertTo
		}

		i := strings.LastIndex(fullName, ".")
		if i == -1 {
			return fullName
		}

		pkgPath := fullName[0:i]
		name := fullName[i+1:]

		selector := g.PackageSelector(pkgPath)
		if selector == "" {
			return name
		}

		return selector + "." + name
	case *types.Basic:
		return t.Name()
	case *types.Interface:
		return "interface{}"
	default:
		log.Fatalf("Can't generate local type name for type %T: %v", t, t)
	}

	return ""
}