Change default connection state to unknown

This commit is contained in:
Ivan Danyliuk 2018-02-15 18:48:19 -08:00 committed by Frank Mueller
parent bc1c3e6337
commit f78b79b49b
2 changed files with 4 additions and 4 deletions

View File

@ -36,9 +36,9 @@ func NewConnectionType(s string) ConnectionType {
// ConnectionType constants
const (
ConnectionCellular ConnectionType = iota // default value, LTE, 4G, 3G, EDGE, etc.
ConnectionWifi // WIFI or iOS simulator
ConnectionUnknown
ConnectionUnknown ConnectionType = iota
ConnectionCellular // cellular, LTE, 4G, 3G, EDGE, etc.
ConnectionWifi // WIFI or iOS simulator
)
// String formats ConnectionState for logs. Implements Stringer.

View File

@ -26,7 +26,7 @@ func TestConnectionState(t *testing.T) {
{
"zero value",
ConnectionState{},
"cellular",
"unknown",
},
{
"offline",