As of efdf3f4 the current implementation of client.StationInfo returns the error os.ErrNotExist if there are no clients connected to the interface even when the given interface runs in Access Point mode.
This is a weird behavior since it complicates the handling of errors returned from client.StationInfo with an additional check if the given error is os.ErrNotExist. Returning an empty array here would simplify things. Relevant koan: http://thecodelesscode.com/case/6.
Would love to hear your opinion about this @mdlayher!
As of efdf3f4 the current implementation of
client.StationInforeturns the erroros.ErrNotExistif there are no clients connected to the interface even when the given interface runs in Access Point mode.This is a weird behavior since it complicates the handling of errors returned from
client.StationInfowith an additional check if the given error isos.ErrNotExist. Returning an empty array here would simplify things. Relevant koan: http://thecodelesscode.com/case/6.Would love to hear your opinion about this @mdlayher!