Added arn to the main repository

This commit is contained in:
2019-06-03 18:32:43 +09:00
parent cf258573a8
commit 29a48d94a5
465 changed files with 15968 additions and 288 deletions

20
arn/IDList.go Normal file
View File

@ -0,0 +1,20 @@
package arn
// IDList stores lists of IDs that are retrievable by name.
type IDList []string
// GetIDList ...
func GetIDList(id string) (IDList, error) {
obj, err := DB.Get("IDList", id)
if err != nil {
return nil, err
}
return *obj.(*IDList), nil
}
// Append appends the given ID to the end of the list and returns the new IDList.
func (idList IDList) Append(id string) IDList {
return append(idList, id)
}