Make linters happy
This commit is contained in:
parent
4982e1b8b8
commit
bc1c3e6337
|
@ -34,9 +34,10 @@ func NewConnectionType(s string) ConnectionType {
|
|||
return ConnectionUnknown
|
||||
}
|
||||
|
||||
// ConnectionType constants
|
||||
const (
|
||||
ConnectionCellular = iota // default value, LTE, 4G, 3G, EDGE, etc.
|
||||
ConnectionWifi // WIFI or iOS simulator
|
||||
ConnectionCellular ConnectionType = iota // default value, LTE, 4G, 3G, EDGE, etc.
|
||||
ConnectionWifi // WIFI or iOS simulator
|
||||
ConnectionUnknown
|
||||
)
|
||||
|
||||
|
|
|
@ -5,15 +5,15 @@ import "testing"
|
|||
func TestConnectionType(t *testing.T) {
|
||||
c := NewConnectionType("wifi")
|
||||
if c != ConnectionWifi {
|
||||
t.Fatalf("Wrong connection type: %s", c)
|
||||
t.Fatalf("Wrong connection type: %v", c)
|
||||
}
|
||||
c = NewConnectionType("cellular")
|
||||
if c != ConnectionCellular {
|
||||
t.Fatalf("Wrong connection type: %s", c)
|
||||
t.Fatalf("Wrong connection type: %v", c)
|
||||
}
|
||||
c = NewConnectionType("bluetooth")
|
||||
if c != ConnectionUnknown {
|
||||
t.Fatalf("Wrong connection type: %s", c)
|
||||
t.Fatalf("Wrong connection type: %v", c)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue