updated linter and fixed deprecated stuff
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user