SQL/Orm ArtistRepository complete

This commit is contained in:
Deluan
2020-01-12 17:32:06 -05:00
committed by Deluan Quintão
parent 334e8384ce
commit d70af2c39d
9 changed files with 346 additions and 16 deletions
+13
View File
@@ -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
}