Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
caddy
Commits
7d96cfa4
Commit
7d96cfa4
authored
Apr 15, 2015
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turn off log timestamp for parse errors (easier to read)
parent
c7af6725
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
config/config.go
config/config.go
+8
-0
No files found.
config/config.go
View file @
7d96cfa4
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
package
config
package
config
import
(
import
(
"log"
"net"
"net"
"os"
"os"
...
@@ -77,6 +78,10 @@ func Load(filename string) ([]Config, error) {
...
@@ -77,6 +78,10 @@ func Load(filename string) ([]Config, error) {
}
}
defer
file
.
Close
()
defer
file
.
Close
()
// turn off timestamp for parsing
flags
:=
log
.
Flags
()
log
.
SetFlags
(
0
)
p
,
err
:=
newParser
(
file
)
p
,
err
:=
newParser
(
file
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
@@ -91,6 +96,9 @@ func Load(filename string) ([]Config, error) {
...
@@ -91,6 +96,9 @@ func Load(filename string) ([]Config, error) {
cfgs
[
i
]
.
ConfigFile
=
filename
cfgs
[
i
]
.
ConfigFile
=
filename
}
}
// restore logging settings
log
.
SetFlags
(
flags
)
return
cfgs
,
nil
return
cfgs
,
nil
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment