mirror of
https://github.com/containers/podman.git
synced 2025-06-05 05:57:24 +08:00
fix(deps): update github.com/containers/common digest to 3e93a76
Signed-off-by: Renovate Bot <bot@renovateapp.com>
This commit is contained in:
19
vendor/github.com/go-openapi/spec/info.go
generated
vendored
19
vendor/github.com/go-openapi/spec/info.go
generated
vendored
@ -16,6 +16,7 @@ package spec
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/go-openapi/jsonpointer"
|
||||
@ -40,6 +41,24 @@ func (e Extensions) GetString(key string) (string, bool) {
|
||||
return "", false
|
||||
}
|
||||
|
||||
// GetInt gets a int value from the extensions
|
||||
func (e Extensions) GetInt(key string) (int, bool) {
|
||||
realKey := strings.ToLower(key)
|
||||
|
||||
if v, ok := e.GetString(realKey); ok {
|
||||
if r, err := strconv.Atoi(v); err == nil {
|
||||
return r, true
|
||||
}
|
||||
}
|
||||
|
||||
if v, ok := e[realKey]; ok {
|
||||
if r, rOk := v.(float64); rOk {
|
||||
return int(r), true
|
||||
}
|
||||
}
|
||||
return -1, false
|
||||
}
|
||||
|
||||
// GetBool gets a string value from the extensions
|
||||
func (e Extensions) GetBool(key string) (bool, bool) {
|
||||
if v, ok := e[strings.ToLower(key)]; ok {
|
||||
|
Reference in New Issue
Block a user