5

How can I get the SSID and other network information in golang?

For example the network to which I am currently connected.

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
Mister Verleg
  • 4,053
  • 5
  • 43
  • 68

1 Answers1

3

There does not seem to be a native Go command to do this. You might instead execute system-specific tools from within your Go code and check their output. Examples are

https://github.com/yelinaung/wifi-name (Linux and OS X)

or

List of available wireless networks with golang (under Linux)

or

https://github.com/skycoin/skycoin/tree/master/src/aether/wifi (Linux)

This seems to be the same for Java:

https://stackoverflow.com/a/12785503/1370397

Community
  • 1
  • 1
alex
  • 2,252
  • 4
  • 23
  • 34