// RemoveByName remove pkg from PackageList by import path
9974
func (t *PackageList) RemoveByName(name string) {
	t.ensureInit()
	if pkg := t.LookupByName(name); pkg != nil {
		delete(t.pkgpool, pkg)
		delete(t.dirpool, pkg.Dir)
		delete(t.namepool, getPackageName(pkg))
	}
}
602425
func (p *Parameter) ByName(name string) (string, error) {
	if i, has := p.names[name]; has {
		return p.findParam(i)
	}
	return "", fmt.Errorf("Parameter not found")
}
1090569
func removeKey(name, username string) error {
	var k Key
	conn, err := db.Conn()
	if err != nil {
		return err
	}
	defer conn.Close()
	err = conn.Key().Find(bson.M{"name": name, "username": username}).One(&k)
	if err != nil {
		return ErrKeyNotFound
	}
	conn.Key().Remove(k)
	return remove(&k)
}
1290753
func (api *BridgeAPI) SortByName(reverse bool) *BridgeAPI {
	api.sortByName(reverse)
	return api
}
675890
func (api *CDROMAPI) SortByName(reverse bool) *CDROMAPI {
	api.sortByName(reverse)
	return api
}
33791
func (r *Resource) MethodByName(name string) *Method {
	switch name {
	case "GET":
		return r.Get
	case "POST":
		return r.Post
	case "PUT":
		return r.Put
	case "PATCH":
		return r.Patch
	case "HEAD":
		return r.Head
	case "DELETE":
		return r.Delete
	case "OPTIONS":
		return r.Options
	default:
		return nil
	}
}
981405
func (api *VPCRouterAPI) SortByName(reverse bool) *VPCRouterAPI {
	api.sortByName(reverse)
	return api
}
757152
func (t *PackageList) RemovePackage(pkg *build.Package) {
	if pkg == nil {
		return
	}
	t.RemoveByDir(pkg.Dir)
}
384912
func (c *Client) RemovePackage(name string) error {
	_, stderr, err := c.execNpm("remove", name)
	if err != nil {
		return errors.New(stderr)
	}
	return nil
}
486324
func (actor Actor) DeleteIsolationSegmentByName(name string) (Warnings, error) {
	isolationSegment, warnings, err := actor.GetIsolationSegmentByName(name)
	allWarnings := append(Warnings{}, warnings...)
	if err != nil {
		return allWarnings, err
	}

	apiWarnings, err := actor.CloudControllerClient.DeleteIsolationSegment(isolationSegment.GUID)
	return append(allWarnings, apiWarnings...), err
}
579347
func (api *InterfaceAPI) SortByName(reverse bool) *InterfaceAPI {
	api.sortByName(reverse)
	return api
}
905101
func ByName(pattern, root string) (result *list.List, err error) {
	sp := NewShellPattern(pattern)
	return By(sp, root)
}
852079
func (mc MongoClient) DeleteRegistrationByName(name string) error {
	return mc.deleteRegistration(bson.M{"name": name})
}
1076228
func (ps Params) ByName(name string) string {
	for i := range ps {
		if ps[i].Key == name {
			return ps[i].Value
		}
	}
	return ""
}
1121554
func packageWithName(name string) (pkg *build.Package, err error) {
	pkg, err = build.Default.Import(name, ".", build.ImportMode(0))
	if err == nil {
		return
	}

	pkg, err = build.Default.Import(name, ".", build.ImportMode(1))
	return
}
414505
func sanitizePackageName(pkgName string) string {
	pkgName = strings.Replace(pkgName, ".", "_", -1)
	pkgName = strings.Replace(pkgName, "-", "_", -1)
	return pkgName
}
1180228
func (d *Dependencies) remove(resolved string) {
	for i, name := range d.All {
		if name == resolved {
			d.All = append(d.All[:i], d.All[i+1:]...)
		}
	}
}