Fix gosec, govet, and errorlint linter errors
Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
@@ -12,10 +12,10 @@ import (
|
||||
type Config struct {
|
||||
Server ServerConfig `toml:"server"`
|
||||
Web WebConfig `toml:"web"`
|
||||
Database DatabaseConfig `toml:"database"`
|
||||
MCIAS MCIASConfig `toml:"mcias"`
|
||||
Seal SealConfig `toml:"seal"`
|
||||
Database DatabaseConfig `toml:"database"`
|
||||
Log LogConfig `toml:"log"`
|
||||
Seal SealConfig `toml:"seal"`
|
||||
}
|
||||
|
||||
// ServerConfig holds HTTP/gRPC server settings.
|
||||
@@ -66,7 +66,7 @@ type LogConfig struct {
|
||||
|
||||
// Load reads and parses a TOML config file.
|
||||
func Load(path string) (*Config, error) {
|
||||
data, err := os.ReadFile(path)
|
||||
data, err := os.ReadFile(path) //nolint:gosec
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("config: read file: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user