format.go
func (f *defaultFormats) DelByFormat(strfmt Format) bool {
	f.Lock()
	defer f.Unlock()

	tpe := reflect.TypeOf(strfmt)
	if tpe.Kind() == reflect.Ptr {
		tpe = tpe.Elem()
	}

	for i, v := range f.data {
		if v.Type == tpe {
			f.data[i] = knownFormat{} // release
			f.data = append(f.data[:i], f.data[i+1:]...)
			return true
		}
	}
	return false
}
func (f *defaultFormats) DelByFormat(strfmt Format) bool {
	f.Lock()
	defer f.Unlock()

	tpe := reflect.TypeOf(strfmt)
	if tpe.Kind() == reflect.Ptr {
		tpe = tpe.Elem()
	}

	for i, v := range f.data {
		if v.Type == tpe {
			f.data[i] = knownFormat{} // release
			f.data = append(f.data[:i], f.data[i+1:]...)
			return true
		}
	}
	return false
}
func ( f * defaultFormats ) DelByFormat ( strfmt Format ) bool { f . Lock ( ) defer f . Unlock ( ) tpe := reflect . TypeOf ( strfmt ) if tpe . Kind ( ) == reflect . Ptr { tpe = tpe . Elem ( ) } for i , v := range f . data { if v . Type == tpe { f . data [ i ] = knownFormat { } // release f . data = append ( f . data [ : i ] , f . data [ i + 1 : ] ... ) return true } } return false }
// DelByType removes the specified format, returns true when an item was actually removed
DelByType removes the specified format returns true when an item was actually removed