This is a created article in which the information may have evolved or changed.
1, install Sublim Text 2, no charge, Sublim 3 charge and live in Python 3 many plugins can not be used
2. Create a directory such as MkDir GetIP
3. Sublim Menu Project->save Project as save file to GetIP directory
Add the following content to the Getip.sublime-project file
{"Settings": {"Gosublime": {" env": { "Gopath": "$HOME/go-project/getip" }}} , "folders": [{"Path": "/users/test01/go-project/getip"}]}
4, Project->open project open Getip.sublime-project, that is, open the project you built
Then create the package getip (that is, the folder) under SRC, and then build the Main.go
Package Mainimport ("FMT" "Net" "strings") func main () {info, _: = Net. Interfaceaddrs () for _, Addr: = Range Info {fmt. PRINTLN (Strings. Split (addr. String (), "/") [0])}}
5. ctrl+9 or super+9 Open the 9o command line run