func Append()

in golang/client/client.go [79:90]


func Append(array interface{}, item interface{}) {
	r := reflect.ValueOf(array)
	if r.Kind().String() == "array" || r.Kind().String() == "slice" {
		aLen := r.Len()
		res := make([]interface{}, 0)
		for i := 0; i < aLen; i++ {
			res = append(res, r.Index(i).Interface())
		}
		res = append(res, item)
		tea.Convert(res, &array)
	}
}