mirror of
https://git.mills.io/prologic/zs
synced 2024-11-21 21:06:10 +03:00
Fix tests and squelch warning if config file not found
This commit is contained in:
parent
f64268f9cd
commit
dfaa5cd490
4
main.go
4
main.go
@ -709,7 +709,9 @@ func initConfig() {
|
||||
|
||||
// If a config file is found, read it in.
|
||||
if err := viper.ReadInConfig(); err != nil {
|
||||
log.WithError(err).Warnf("error reading config %s (using defaults)", viper.ConfigFileUsed())
|
||||
if _, ok := err.(viper.ConfigFileNotFoundError); !ok {
|
||||
log.WithError(err).Warnf("error reading config %s (using defaults)", viper.ConfigFileUsed())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
2
testdata/extensions/.test/index.html
vendored
2
testdata/extensions/.test/index.html
vendored
@ -2,7 +2,7 @@
|
||||
<head>
|
||||
<title>Hello World</title>
|
||||
</head>
|
||||
<body><h1 id="hello-world">Hello World <a class="anchor" href="#hello-world">¶</a></h1>
|
||||
<body><h1 id="hello-world">Hello World <a class="anchor" href="#hello-world"> </a></h1>
|
||||
<p>Hello World!</p>
|
||||
</body>
|
||||
</html>
|
||||
|
2
testdata/ignore/.test/index.html
vendored
2
testdata/ignore/.test/index.html
vendored
@ -1,5 +1,5 @@
|
||||
<html>
|
||||
<body><h1 id="simple">Simple <a class="anchor" href="#simple">¶</a></h1>
|
||||
<body><h1 id="simple">Simple <a class="anchor" href="#simple"> </a></h1>
|
||||
<p>Simple page</p>
|
||||
</body>
|
||||
</html>
|
||||
|
2
testdata/simple/.test/index.html
vendored
2
testdata/simple/.test/index.html
vendored
@ -1,5 +1,5 @@
|
||||
<html>
|
||||
<body><h1 id="simple">Simple <a class="anchor" href="#simple">¶</a></h1>
|
||||
<body><h1 id="simple">Simple <a class="anchor" href="#simple"> </a></h1>
|
||||
<p>Simple page</p>
|
||||
</body>
|
||||
</html>
|
||||
|
2
testdata/variables/.test/index.html
vendored
2
testdata/variables/.test/index.html
vendored
@ -2,7 +2,7 @@
|
||||
<head>
|
||||
<title>Simple</title>
|
||||
</head>
|
||||
<body><h1 id="simple">Simple <a class="anchor" href="#simple">¶</a></h1>
|
||||
<body><h1 id="simple">Simple <a class="anchor" href="#simple"> </a></h1>
|
||||
<p>Simple page</p>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user