diff options
author | Bjørn Erik Pedersen <[email protected]> | 2016-03-23 00:04:28 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2016-03-23 00:04:28 +0100 |
commit | da4d4164f1a834d1a8b84f33cb49b4fc1999d4dc (patch) | |
tree | dc8f9b27de628231a669d46dd6977e815fe94b1d /utils | |
parent | df92fc31caf84edfaa6d0076227e1f5f009a4198 (diff) | |
download | hugo-da4d4164f1a834d1a8b84f33cb49b4fc1999d4dc.tar.gz hugo-da4d4164f1a834d1a8b84f33cb49b4fc1999d4dc.zip |
utils: Add godoc
Diffstat (limited to 'utils')
-rw-r--r-- | utils/utils.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/utils.go b/utils/utils.go index 6f4264cca..a3329c4a9 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -1,4 +1,4 @@ -// Copyright 2015 The Hugo Authors. All rights reserved. +// Copyright 2016 The Hugo Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,6 +19,8 @@ import ( jww "github.com/spf13/jwalterweatherman" ) +// CheckErr logs the messages given and then the error. +// TODO(bep) Remove this package. func CheckErr(err error, s ...string) { if err == nil { return @@ -33,6 +35,7 @@ func CheckErr(err error, s ...string) { jww.ERROR.Println(err) } +// StopOnErr exits on any error after logging it. func StopOnErr(err error, s ...string) { if err == nil { return |