Skip to content

Commit

Permalink
style(log) config.toml template docs url (#1894)
Browse files Browse the repository at this point in the history
* fix: config.toml template url

* applied fixes to other places
  • Loading branch information
future-ryunosuketanai committed Apr 16, 2024
1 parent d1137ad commit a6cafab
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/config_v1.go
Expand Up @@ -135,7 +135,7 @@ func convertToLatestConfig(pathToToml string) error {
}
str := strings.Replace(buf.String(), "\n [", "\n\n [", -1)
str = fmt.Sprintf("%s\n\n%s",
"# See README for details: https://vuls.io/docs/en/usage-settings.html",
"# See README for details: https://vuls.io/docs/en/config.toml.html",
str)

return os.WriteFile(realPath, []byte(str), 0600)
Expand Down
2 changes: 1 addition & 1 deletion saas/uuid.go
Expand Up @@ -140,7 +140,7 @@ func writeToFile(cnf config.Config, path string) error {
}
str := strings.Replace(buf.String(), "\n [", "\n\n [", -1)
str = fmt.Sprintf("%s\n\n%s",
"# See README for details: https://vuls.io/docs/en/usage-settings.html",
"# See README for details: https://vuls.io/docs/en/config.toml.html",
str)

return os.WriteFile(realPath, []byte(str), 0600)
Expand Down
2 changes: 1 addition & 1 deletion subcmds/configtest.go
Expand Up @@ -77,7 +77,7 @@ func (p *ConfigtestCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interfa
msg := []string{
fmt.Sprintf("Error loading %s", p.configPath),
"If you update Vuls and get this error, there may be incompatible changes in config.toml",
"Please check config.toml template : https://vuls.io/docs/en/usage-settings.html",
"Please check config.toml template : https://vuls.io/docs/en/config.toml.html",
}
logging.Log.Errorf("%s\n%+v", strings.Join(msg, "\n"), err)
return subcommands.ExitUsageError
Expand Down
2 changes: 1 addition & 1 deletion subcmds/scan.go
Expand Up @@ -113,7 +113,7 @@ func (p *ScanCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{})
msg := []string{
fmt.Sprintf("Error loading %s", p.configPath),
"If you update Vuls and get this error, there may be incompatible changes in config.toml",
"Please check config.toml template : https://vuls.io/docs/en/usage-settings.html",
"Please check config.toml template : https://vuls.io/docs/en/config.toml.html",
}
logging.Log.Errorf("%s\n%+v", strings.Join(msg, "\n"), err)
return subcommands.ExitUsageError
Expand Down

0 comments on commit a6cafab

Please sign in to comment.