Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Cycle



  How to check when an API is introduced in GoLang

Normally people would not pay much attention to which GoLang version is being used as lots of functions are backward compatible. However there are cases where GoLang version does matter as some functions may not be supported by old version of GoLang. For example, strings.Builder is introduced in Go 1.10, but below code would fail to be compiled on Go 1.10. package main import ( "fmt" "strings" ) func main() { var b strings.Builder b.WriteString("polarisxu") fmt.Println(b.Cap()) } The ...

   GOLANG,API VERSION,GO TOOL     2021-02-07 00:43:24