mirror of
https://github.com/containers/podman.git
synced 2025-10-19 12:12:36 +08:00
Vendor latest c/image
Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
This commit is contained in:
92
vendor/github.com/go-openapi/strfmt/.golangci.yml
generated
vendored
92
vendor/github.com/go-openapi/strfmt/.golangci.yml
generated
vendored
@ -4,56 +4,58 @@ linters-settings:
|
||||
golint:
|
||||
min-confidence: 0
|
||||
gocyclo:
|
||||
min-complexity: 31
|
||||
min-complexity: 45
|
||||
maligned:
|
||||
suggest-new: true
|
||||
dupl:
|
||||
threshold: 100
|
||||
threshold: 200
|
||||
goconst:
|
||||
min-len: 2
|
||||
min-occurrences: 4
|
||||
min-occurrences: 3
|
||||
|
||||
linters:
|
||||
enable:
|
||||
- revive
|
||||
- goimports
|
||||
- gosec
|
||||
enable-all: true
|
||||
disable:
|
||||
- maligned
|
||||
- unparam
|
||||
- unconvert
|
||||
- predeclared
|
||||
- prealloc
|
||||
- misspell
|
||||
|
||||
# disable:
|
||||
# - maligned
|
||||
# - lll
|
||||
# - gochecknoinits
|
||||
# - gochecknoglobals
|
||||
# - godox
|
||||
# - gocognit
|
||||
# - whitespace
|
||||
# - wsl
|
||||
# - funlen
|
||||
# - wrapcheck
|
||||
# - testpackage
|
||||
# - nlreturn
|
||||
# - gofumpt
|
||||
# - goerr113
|
||||
# - gci
|
||||
# - gomnd
|
||||
# - godot
|
||||
# - exhaustivestruct
|
||||
# - paralleltest
|
||||
# - varnamelen
|
||||
# - ireturn
|
||||
# - exhaustruct
|
||||
# #- thelper
|
||||
|
||||
issues:
|
||||
exclude-rules:
|
||||
- path: bson.go
|
||||
text: "should be .*ObjectID"
|
||||
linters:
|
||||
- golint
|
||||
- stylecheck
|
||||
|
||||
- lll
|
||||
- gochecknoinits
|
||||
- gochecknoglobals
|
||||
- funlen
|
||||
- godox
|
||||
- gocognit
|
||||
- whitespace
|
||||
- wsl
|
||||
- wrapcheck
|
||||
- testpackage
|
||||
- nlreturn
|
||||
- gomnd
|
||||
- exhaustivestruct
|
||||
- goerr113
|
||||
- errorlint
|
||||
- nestif
|
||||
- godot
|
||||
- gofumpt
|
||||
- paralleltest
|
||||
- tparallel
|
||||
- thelper
|
||||
- ifshort
|
||||
- exhaustruct
|
||||
- varnamelen
|
||||
- gci
|
||||
- depguard
|
||||
- errchkjson
|
||||
- inamedparam
|
||||
- nonamedreturns
|
||||
- musttag
|
||||
- ireturn
|
||||
- forcetypeassert
|
||||
- cyclop
|
||||
# deprecated linters
|
||||
- deadcode
|
||||
- interfacer
|
||||
- scopelint
|
||||
- varcheck
|
||||
- structcheck
|
||||
- golint
|
||||
- nosnakecase
|
||||
|
5
vendor/github.com/go-openapi/strfmt/README.md
generated
vendored
5
vendor/github.com/go-openapi/strfmt/README.md
generated
vendored
@ -1,8 +1,7 @@
|
||||
# Strfmt [](https://travis-ci.org/go-openapi/strfmt) [](https://codecov.io/gh/go-openapi/strfmt) [](https://slackin.goswagger.io)
|
||||
|
||||
# Strfmt [](https://github.com/go-openapi/strfmt/actions?query=workflow%3A"go+test") [](https://codecov.io/gh/go-openapi/strfmt)
|
||||
[](https://slackin.goswagger.io)
|
||||
[](https://raw.githubusercontent.com/go-openapi/strfmt/master/LICENSE)
|
||||
[](http://godoc.org/github.com/go-openapi/strfmt)
|
||||
[](https://golangci.com)
|
||||
[](https://goreportcard.com/report/github.com/go-openapi/strfmt)
|
||||
|
||||
This package exposes a registry of data types to support string formats in the go-openapi toolkit.
|
||||
|
6
vendor/github.com/go-openapi/strfmt/bson.go
generated
vendored
6
vendor/github.com/go-openapi/strfmt/bson.go
generated
vendored
@ -39,10 +39,10 @@ func IsBSONObjectID(str string) bool {
|
||||
// ObjectId represents a BSON object ID (alias to go.mongodb.org/mongo-driver/bson/primitive.ObjectID)
|
||||
//
|
||||
// swagger:strfmt bsonobjectid
|
||||
type ObjectId bsonprim.ObjectID //nolint:revive
|
||||
type ObjectId bsonprim.ObjectID //nolint:revive,stylecheck
|
||||
|
||||
// NewObjectId creates a ObjectId from a Hex String
|
||||
func NewObjectId(hex string) ObjectId { //nolint:revive
|
||||
func NewObjectId(hex string) ObjectId { //nolint:revive,stylecheck
|
||||
oid, err := bsonprim.ObjectIDFromHex(hex)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@ -135,7 +135,7 @@ func (id *ObjectId) UnmarshalBSON(data []byte) error {
|
||||
// BSON document if the error is nil.
|
||||
func (id ObjectId) MarshalBSONValue() (bsontype.Type, []byte, error) {
|
||||
oid := bsonprim.ObjectID(id)
|
||||
return bsontype.ObjectID, oid[:], nil
|
||||
return bson.TypeObjectID, oid[:], nil
|
||||
}
|
||||
|
||||
// UnmarshalBSONValue is an interface implemented by types that can unmarshal a
|
||||
|
2
vendor/github.com/go-openapi/strfmt/format.go
generated
vendored
2
vendor/github.com/go-openapi/strfmt/format.go
generated
vendored
@ -94,7 +94,7 @@ func NewSeededFormats(seeds []knownFormat, normalizer NameNormalizer) Registry {
|
||||
}
|
||||
|
||||
// MapStructureHookFunc is a decode hook function for mapstructure
|
||||
func (f *defaultFormats) MapStructureHookFunc() mapstructure.DecodeHookFunc { //nolint:gocyclo,cyclop
|
||||
func (f *defaultFormats) MapStructureHookFunc() mapstructure.DecodeHookFunc {
|
||||
return func(from reflect.Type, to reflect.Type, obj interface{}) (interface{}, error) {
|
||||
if from.Kind() != reflect.String {
|
||||
return obj, nil
|
||||
|
8
vendor/github.com/go-openapi/strfmt/time.go
generated
vendored
8
vendor/github.com/go-openapi/strfmt/time.go
generated
vendored
@ -76,6 +76,8 @@ const (
|
||||
ISO8601TimeWithReducedPrecisionLocaltime = "2006-01-02T15:04"
|
||||
// ISO8601TimeUniversalSortableDateTimePattern represents a ISO8601 universal sortable date time pattern.
|
||||
ISO8601TimeUniversalSortableDateTimePattern = "2006-01-02 15:04:05"
|
||||
// short form of ISO8601TimeUniversalSortableDateTimePattern
|
||||
ISO8601TimeUniversalSortableDateTimePatternShortForm = "2006-01-02"
|
||||
// DateTimePattern pattern to match for the date-time format from http://tools.ietf.org/html/rfc3339#section-5.6
|
||||
DateTimePattern = `^([0-9]{2}):([0-9]{2}):([0-9]{2})(.[0-9]+)?(z|([+-][0-9]{2}:[0-9]{2}))$`
|
||||
)
|
||||
@ -84,7 +86,7 @@ var (
|
||||
rxDateTime = regexp.MustCompile(DateTimePattern)
|
||||
|
||||
// DateTimeFormats is the collection of formats used by ParseDateTime()
|
||||
DateTimeFormats = []string{RFC3339Micro, RFC3339MicroNoColon, RFC3339Millis, RFC3339MillisNoColon, time.RFC3339, time.RFC3339Nano, ISO8601LocalTime, ISO8601TimeWithReducedPrecision, ISO8601TimeWithReducedPrecisionLocaltime, ISO8601TimeUniversalSortableDateTimePattern}
|
||||
DateTimeFormats = []string{RFC3339Micro, RFC3339MicroNoColon, RFC3339Millis, RFC3339MillisNoColon, time.RFC3339, time.RFC3339Nano, ISO8601LocalTime, ISO8601TimeWithReducedPrecision, ISO8601TimeWithReducedPrecisionLocaltime, ISO8601TimeUniversalSortableDateTimePattern, ISO8601TimeUniversalSortableDateTimePatternShortForm}
|
||||
|
||||
// MarshalFormat sets the time resolution format used for marshaling time (set to milliseconds)
|
||||
MarshalFormat = RFC3339Millis
|
||||
@ -245,7 +247,7 @@ func (t DateTime) MarshalBSONValue() (bsontype.Type, []byte, error) {
|
||||
buf := make([]byte, 8)
|
||||
binary.LittleEndian.PutUint64(buf, uint64(i64))
|
||||
|
||||
return bsontype.DateTime, buf, nil
|
||||
return bson.TypeDateTime, buf, nil
|
||||
}
|
||||
|
||||
// UnmarshalBSONValue is an interface implemented by types that can unmarshal a
|
||||
@ -253,7 +255,7 @@ func (t DateTime) MarshalBSONValue() (bsontype.Type, []byte, error) {
|
||||
// assumed to be valid. UnmarshalBSONValue must copy the BSON value bytes if it
|
||||
// wishes to retain the data after returning.
|
||||
func (t *DateTime) UnmarshalBSONValue(tpe bsontype.Type, data []byte) error {
|
||||
if tpe == bsontype.Null {
|
||||
if tpe == bson.TypeNull {
|
||||
*t = DateTime{}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user