buffalo/cmd/fix/imports.go
func (c ImportConverter) match(importpath string) (string, bool) {
	for key, value := range c.Data {
		if !strings.HasPrefix(importpath, key) {
			continue
		}

		result := strings.Replace(importpath, key, value, 1)
		return result, true
	}

	return importpath, false
}
func (c ImportConverter) match(importpath string) (string, bool) {
	for key, value := range c.Data {
		if !strings.HasPrefix(importpath, key) {
			continue
		}

		result := strings.Replace(importpath, key, value, 1)
		return result, true
	}

	return importpath, false
}
func ( c ImportConverter ) match ( importpath string ) ( string , bool ) { for key , value := range c . Data { if ! strings . HasPrefix ( importpath , key ) { continue } result := strings . Replace ( importpath , key , value , 1 ) return result , true } return importpath , false }
// match takes an import path and replacement map.
match takes an import path and replacement map .