Add new types strings conversions
This commit is contained in:
parent
0f5a9d164e
commit
df51fdd589
3 changed files with 90 additions and 0 deletions
24
nmcapability_string.go
Normal file
24
nmcapability_string.go
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
// Code generated by "stringer -type=NmCapability"; DO NOT EDIT.
|
||||||
|
|
||||||
|
package gonetworkmanager
|
||||||
|
|
||||||
|
import "strconv"
|
||||||
|
|
||||||
|
func _() {
|
||||||
|
// An "invalid array index" compiler error signifies that the constant values have changed.
|
||||||
|
// Re-run the stringer command to generate them again.
|
||||||
|
var x [1]struct{}
|
||||||
|
_ = x[NmCapabilityTeam-1]
|
||||||
|
}
|
||||||
|
|
||||||
|
const _NmCapability_name = "NmCapabilityTeam"
|
||||||
|
|
||||||
|
var _NmCapability_index = [...]uint8{0, 16}
|
||||||
|
|
||||||
|
func (i NmCapability) String() string {
|
||||||
|
i -= 1
|
||||||
|
if i >= NmCapability(len(_NmCapability_index)-1) {
|
||||||
|
return "NmCapability(" + strconv.FormatInt(int64(i+1), 10) + ")"
|
||||||
|
}
|
||||||
|
return _NmCapability_name[_NmCapability_index[i]:_NmCapability_index[i+1]]
|
||||||
|
}
|
39
nmcheckpointcreateflags_string.go
Normal file
39
nmcheckpointcreateflags_string.go
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
// Code generated by "stringer -type=NmCheckpointCreateFlags"; DO NOT EDIT.
|
||||||
|
|
||||||
|
package gonetworkmanager
|
||||||
|
|
||||||
|
import "strconv"
|
||||||
|
|
||||||
|
func _() {
|
||||||
|
// An "invalid array index" compiler error signifies that the constant values have changed.
|
||||||
|
// Re-run the stringer command to generate them again.
|
||||||
|
var x [1]struct{}
|
||||||
|
_ = x[NmCheckpointCreateFlagsNone-0]
|
||||||
|
_ = x[NmCheckpointCreateFlagsDestroyAll-1]
|
||||||
|
_ = x[NmCheckpointCreateFlagsDeleteNewConnections-2]
|
||||||
|
_ = x[NmCheckpointCreateFlagsDisconnectNewDevices-4]
|
||||||
|
_ = x[NmCheckpointCreateFlagsAllowOverlapping-8]
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
_NmCheckpointCreateFlags_name_0 = "NmCheckpointCreateFlagsNoneNmCheckpointCreateFlagsDestroyAllNmCheckpointCreateFlagsDeleteNewConnections"
|
||||||
|
_NmCheckpointCreateFlags_name_1 = "NmCheckpointCreateFlagsDisconnectNewDevices"
|
||||||
|
_NmCheckpointCreateFlags_name_2 = "NmCheckpointCreateFlagsAllowOverlapping"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
_NmCheckpointCreateFlags_index_0 = [...]uint8{0, 27, 60, 103}
|
||||||
|
)
|
||||||
|
|
||||||
|
func (i NmCheckpointCreateFlags) String() string {
|
||||||
|
switch {
|
||||||
|
case 0 <= i && i <= 2:
|
||||||
|
return _NmCheckpointCreateFlags_name_0[_NmCheckpointCreateFlags_index_0[i]:_NmCheckpointCreateFlags_index_0[i+1]]
|
||||||
|
case i == 4:
|
||||||
|
return _NmCheckpointCreateFlags_name_1
|
||||||
|
case i == 8:
|
||||||
|
return _NmCheckpointCreateFlags_name_2
|
||||||
|
default:
|
||||||
|
return "NmCheckpointCreateFlags(" + strconv.FormatInt(int64(i), 10) + ")"
|
||||||
|
}
|
||||||
|
}
|
27
nmmetered_string.go
Normal file
27
nmmetered_string.go
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
// Code generated by "stringer -type=NmMetered"; DO NOT EDIT.
|
||||||
|
|
||||||
|
package gonetworkmanager
|
||||||
|
|
||||||
|
import "strconv"
|
||||||
|
|
||||||
|
func _() {
|
||||||
|
// An "invalid array index" compiler error signifies that the constant values have changed.
|
||||||
|
// Re-run the stringer command to generate them again.
|
||||||
|
var x [1]struct{}
|
||||||
|
_ = x[NmMeteredUnknown-0]
|
||||||
|
_ = x[NmMeteredYes-1]
|
||||||
|
_ = x[NmMeteredNo-2]
|
||||||
|
_ = x[NmMeteredGuessYes-3]
|
||||||
|
_ = x[NmMeteredGuessNo-4]
|
||||||
|
}
|
||||||
|
|
||||||
|
const _NmMetered_name = "NmMeteredUnknownNmMeteredYesNmMeteredNoNmMeteredGuessYesNmMeteredGuessNo"
|
||||||
|
|
||||||
|
var _NmMetered_index = [...]uint8{0, 16, 28, 39, 56, 72}
|
||||||
|
|
||||||
|
func (i NmMetered) String() string {
|
||||||
|
if i >= NmMetered(len(_NmMetered_index)-1) {
|
||||||
|
return "NmMetered(" + strconv.FormatInt(int64(i), 10) + ")"
|
||||||
|
}
|
||||||
|
return _NmMetered_name[_NmMetered_index[i]:_NmMetered_index[i+1]]
|
||||||
|
}
|
Reference in a new issue