标签:golang false nbsp lan com color lang package for
引用:https://github.com/jiashaokun/go-util
只在使用中实现了部分函数
package Util func InArray(s interface{}, d map[string]string) int { for _, v := range d { if s == v { return 1 } } return 0 } func ArrayKeys(s string, d map[string]string) int { for k, _ := range d { if s == d { return true } } return false } func ArrayColumn(d map[int]map[string]string, column_key string, index_key string) map[int]map[string]string { nd := make(map[int]map[string]string) for k, v := range d { for e, q := range v { if e == index_key { nd[k][index_key] = q } } } return nd }
golang( 实现PHP Array 函数 array_column,array_keys, in_array )
标签:golang false nbsp lan com color lang package for
原文地址:http://www.cnblogs.com/SkeyJIA/p/6386811.html