// -------------
4840
func collections(c *cli.Context) error {
	format := c.String(FormatKey)
	if format == "" {
		format = OutputFormatRaw
	}

	var log flog.Logger
	if format == OutputFormatRaw {
		log = flog.NewDefaultRawLogger()
	} else if format == OutputFormatJSON {
		log = flog.NewDefaultJSONLoger()
	} else {
		fmt.Printf("%s: invalid format: %s\n", colorstring.Red("Error"), format)
		os.Exit(1)
	}

	steplibInfos := []models.SteplibInfoModel{}
	stepLibURIs := stepman.GetAllStepCollectionPath()
	for _, steplibURI := range stepLibURIs {
		route, found := stepman.ReadRoute(steplibURI)
		if !found {
			log.Print(NewErrorOutput("No routing found for steplib: %s", steplibURI))
			os.Exit(1)
		}

		specPth := stepman.GetStepSpecPath(route)

		steplibInfos = append(steplibInfos, models.SteplibInfoModel{
			URI:      steplibURI,
			SpecPath: specPth,
		})
	}

	log.Print(NewOutput(steplibInfos))

	return nil
}
781815
func main() {
    fs, _ := ioutil.ReadDir(".")
    out, _ := os.Create("textfiles.go")
    out.Write([]byte("package nameGen \n\nvar (\n"))
    for _, f := range fs {
        if strings.HasSuffix(f.Name(), ".txt") {
            lines, _ := readFile(f.Name())
            out.Write([]byte(strings.TrimSuffix(f.Name(), ".txt") + " = [" + strconv.Itoa(len(lines)) + "]string {"))
            for _, line := range lines {
              out.Write([]byte("`" + line + "`,"))
            }
            out.Write([]byte("}\n"))
        }
    }
    out.Write([]byte(")\n"))
}
282403
func (b byString) Less(i, j int) bool {
	ithVal := b.Identifier(b.Data.Index(i).Interface())
	jthVal := b.Identifier(b.Data.Index(j).Interface())
	if ithVal == jthVal {
		return b.Indices[i] < b.Indices[j]
	}
	return ithVal < jthVal
}
1273529
func t(tags []string) string {
	for i, v := range tags {
		tags[i] = strings.Replace(v, ":", "=", 1)
	}
	t := ""
	if len(tags) > 0 {
		t = "" + strings.Join(tags, ",")
	}
	return t
}
279654
func (j JE) Error() string {
	finalString := fmt.Sprintf("[code]: %d", j.Code)

	if j.error != "" {
		finalString = finalString + fmt.Sprintf(" [error]: %s", j.error)
	}

	if j.message != "" {
		finalString = finalString + fmt.Sprintf(" [message]: %s", j.message)
	}

	if j.Domain != "" {
		finalString = finalString + fmt.Sprintf(" [domain]: %s", j.Domain)
	}

	if j.DisplayTime {
		finalString = finalString + fmt.Sprintf(" [time]: %d", j.time.UnixNano())
	}

	return finalString
}
1109856
func IsDirectMention(evt *slack.MessageEvent, userID string) bool {
	return regexp.MustCompile("^<@" + userID + ">.*").MatchString(evt.Text)
}
740662
func inCaptionIM(p *parser) bool {
	switch p.tok.Type {
	case StartTagToken:
		switch p.tok.DataAtom {
		case a.Caption, a.Col, a.Colgroup, a.Tbody, a.Td, a.Tfoot, a.Thead, a.Tr:
			if p.popUntil(tableScope, a.Caption) {
				p.clearActiveFormattingElements()
				p.im = inTableIM
				return false
			} else {
				// Ignore the token.
				return true
			}
		case a.Select:
			p.reconstructActiveFormattingElements()
			p.addElement()
			p.framesetOK = false
			p.im = inSelectInTableIM
			return true
		}
	case EndTagToken:
		switch p.tok.DataAtom {
		case a.Caption:
			if p.popUntil(tableScope, a.Caption) {
				p.clearActiveFormattingElements()
				p.im = inTableIM
			}
			return true
		case a.Table:
			if p.popUntil(tableScope, a.Caption) {
				p.clearActiveFormattingElements()
				p.im = inTableIM
				return false
			} else {
				// Ignore the token.
				return true
			}
		case a.Body, a.Col, a.Colgroup, a.Html, a.Tbody, a.Td, a.Tfoot, a.Th, a.Thead, a.Tr:
			// Ignore the token.
			return true
		}
	}
	return inBodyIM(p)
}
899394
func (pdbg *Pdbg) Pdbgf(format string, args ...interface{}) string {
	return pdbg.pdbgfw(format, pdbg.Err(), args...)
}
1154928
func (ditr debugIterator) Valid() (ok bool) {
	defer func() {
		fmt.Printf("%v.itr.Valid() %v\n", ditr.label, ok)
	}()
	ok = ditr.itr.Valid()
	return
}
518344
func Do(ctx context.Context, action, service, uri string, data ...log.Data) {
	d := log.Data{
		"action": action,
		"uri":    uri,
	}

	if len(data) == 0 {
		d["method"] = "GET"
	} else {
		for _, dat := range data {
			for k, v := range dat {
				d[k] = v
			}
		}
	}

	log.InfoCtx(ctx, fmt.Sprintf("Making request to service: %s", service), d)
}
1214672
func typeOf(i interface{}) string {
	if i == nil {
		return ""
	}
	return reflect.TypeOf(i).Elem().Name()
}
153028
func (e *SimpleEventHandler) Inc() {
	e.current++
	if e.max < e.current {
		e.max = e.current
	}
}
932911
func main() {
	args := map[string]string{}
	gp := geopattern.URIimage(args)
	fmt.Println(gp)
}
248192
func IL(in string) string {
	if in == "" {
		return in
	}
	return strings.ToLower(in[:1]) + in[1:]
}
1362639
func main() {
	Tables := []interface{}{
		&promotion.Discount{},
		&promotion.Rule{},
		&promotion.Benefit{},
		&promotion.Coupon{},
		&promotion.BenefitRecord{},
		&enterprise.QorMicroSite{},
	}

	TruncateTables(Tables...)
	createPromotion()
	createMicroSite()
}
1198102
func (primative *Primative) AsNull() (interface{}, error) {
	switch val := primative.value.(type) {
	case nil:
		return val, nil
	}

	msg := fmt.Sprintf("Could not convert value %s to nil", primative.value)
	return 0, errors.New(msg)
}
78020
func Sprint(a ...interface{}) string {
	var out []string
	for _, i := range a {
		out = append(out, fmtI("%s", i))
	}
	return strings.Join(out, " ")
}