MCPcopy
hub / github.com/lxn/walk / assertIntOr

Function assertIntOr

util.go:121–127  ·  view source on GitHub ↗
(value interface{}, defaultValue int)

Source from the content-addressed store, hash-verified

119}
120
121func assertIntOr(value interface{}, defaultValue int) int {
122 if n, ok := value.(int); ok {
123 return n
124 }
125
126 return defaultValue
127}
128
129func assertStringOr(value interface{}, defaultValue string) string {
130 if s, ok := value.(string); ok {

Callers 8

NewTableViewWithCfgFunction · 0.85
NewListBoxWithStyleFunction · 0.85
NewNumberLabelFunction · 0.85
NewImageViewFunction · 0.85
NewTabWidgetFunction · 0.85
NewSliderWithCfgFunction · 0.85
NewCheckBoxFunction · 0.85
newComboBoxWithStyleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…