vendor c/common

Update the recent events-log changes to fix the build error.

[NO NEW TESTS NEEDED] since there's no functional change.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2022-04-21 11:01:48 +02:00
parent 9c36d8458c
commit ff2e6291a5
43 changed files with 153 additions and 142 deletions

View File

@@ -19,7 +19,6 @@ import (
// NetworkCreate will take a partial filled Network and fill the
// missing fields. It creates the Network and returns the full Network.
// nolint:gocritic
func (n *netavarkNetwork) NetworkCreate(net types.Network) (types.Network, error) {
n.lock.Lock()
defer n.lock.Unlock()

View File

@@ -59,9 +59,7 @@ func newIPAMError(cause error, msg string, args ...interface{}) *ipamError {
// openDB will open the ipam database
// Note that the caller has to Close it.
func (n *netavarkNetwork) openDB() (*bbolt.DB, error) {
// linter complains about the octal value
// nolint:gocritic
db, err := bbolt.Open(n.ipamDBPath, 0600, nil)
db, err := bbolt.Open(n.ipamDBPath, 0o600, nil)
if err != nil {
return nil, newIPAMError(err, "failed to open database %s", n.ipamDBPath)
}

View File

@@ -108,11 +108,11 @@ func NewNetworkInterface(conf *InitConfig) (types.ContainerNetwork, error) {
return nil, errors.Wrap(err, "failed to parse default subnet")
}
if err := os.MkdirAll(conf.NetworkConfigDir, 0755); err != nil {
if err := os.MkdirAll(conf.NetworkConfigDir, 0o755); err != nil {
return nil, err
}
if err := os.MkdirAll(conf.NetworkRunDir, 0755); err != nil {
if err := os.MkdirAll(conf.NetworkRunDir, 0o755); err != nil {
return nil, err
}