We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
mark
Sorry, something went wrong.
可能是因为 string 使用场景最多,所以提供 New 函数,默认key类型为 string,用来简化编程
string
New
如果要使用 int 类型作为 key 的话,可以使用 NewStringer 函数,实际使用并无差别
int
key
NewStringer
type Integer int func (i Integer) String() string { return strconv.Itoa(int(i)) } func main() { var intMap = camp.NewStringer[Integer, string]() intMap.Set(1, "1") val, ok := intMap.Get(1) fmt.Println(val, ok) }
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: