updated linter and fixed deprecated stuff

This commit is contained in:
mslacken
2022-10-14 17:40:16 +02:00
parent b5d3de621b
commit ab0ee87629
21 changed files with 50 additions and 60 deletions

View File

@@ -1,9 +1,10 @@
package apiconfig
import (
"gopkg.in/yaml.v2"
"io/ioutil"
"log"
"os"
"gopkg.in/yaml.v2"
)
// ClientApiConfig contains configuration parameters for an API server.
@@ -26,7 +27,7 @@ func NewClient(configFilePath string) (config ClientConfig, err error) {
log.Printf("Loading api client configuration from: %v\n", configFilePath)
var fileBytes []byte
fileBytes, err = ioutil.ReadFile(configFilePath)
fileBytes, err = os.ReadFile(configFilePath)
if err != nil {
return
}

View File

@@ -1,9 +1,10 @@
package apiconfig
import (
"gopkg.in/yaml.v2"
"io/ioutil"
"log"
"os"
"gopkg.in/yaml.v2"
)
// ClientServerConfig is the full client server configuration.
@@ -22,7 +23,7 @@ func NewClientServer(configFilePath string) (config ClientServerConfig, err erro
log.Printf("Loading api client server configuration from: %v\n", configFilePath)
var fileBytes []byte
fileBytes, err = ioutil.ReadFile(configFilePath)
fileBytes, err = os.ReadFile(configFilePath)
if err != nil {
return
}

View File

@@ -1,9 +1,10 @@
package apiconfig
import (
"gopkg.in/yaml.v2"
"io/ioutil"
"log"
"os"
"gopkg.in/yaml.v2"
)
// ServerApiConfig contains configuration parameters for an API server.
@@ -28,7 +29,7 @@ func NewServer(configFilePath string) (config ServerConfig, err error) {
log.Printf("Loading api server configuration from: %v\n", configFilePath)
var fileBytes []byte
fileBytes, err = ioutil.ReadFile(configFilePath)
fileBytes, err = os.ReadFile(configFilePath)
if err != nil {
return
}