SQL/Orm ArtistRepository complete
This commit is contained in:
@@ -1,3 +1,16 @@
|
||||
package persistence
|
||||
|
||||
import "reflect"
|
||||
|
||||
type ProviderIdentifier string
|
||||
|
||||
func CollectValue(collection interface{}, getValue func(item interface{}) string) []string {
|
||||
s := reflect.ValueOf(collection)
|
||||
result := make([]string, s.Len())
|
||||
|
||||
for i := 0; i < s.Len(); i++ {
|
||||
result[i] = getValue(s.Index(i).Interface())
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user