MCPcopy Index your code
hub / github.com/cloudfoundry/cli / Int

Method Int

cf/flags/flags.go:164–176  ·  view source on GitHub ↗
(k string)

Source from the content-addressed store, hash-verified

162}
163
164func (c *flagContext) Int(k string) int {
165 if !c.isFlagProvided(&k) {
166 return 0
167 }
168
169 v := c.flagsets[k].GetValue()
170 switch v.(type) {
171 case int:
172 return v.(int)
173 }
174
175 return 0
176}
177
178func (c *flagContext) Float64(k string) float64 {
179 if !c.isFlagProvided(&k) {

Callers

nothing calls this directly

Calls 2

isFlagProvidedMethod · 0.95
GetValueMethod · 0.65

Tested by

no test coverage detected