diff options
Diffstat (limited to 'go/util')
| -rw-r--r-- | go/util/concurrent_read_map.go | 5 | ||||
| -rw-r--r-- | go/util/config.go | 3 | ||||
| -rw-r--r-- | go/util/file_util.go | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/go/util/concurrent_read_map.go b/go/util/concurrent_read_map.go index 880fe54e3..41cce8b82 100644 --- a/go/util/concurrent_read_map.go +++ b/go/util/concurrent_read_map.go @@ -32,8 +32,7 @@ func (m *ConcurrentReadMap) Get(key string, newEntry func() interface{}) interfa if value, ok := m.Items[key]; ok { m.rmutex.RUnlock() return value - } else { - m.rmutex.RUnlock() - return m.initMapEntry(key, newEntry) } + m.rmutex.RUnlock() + return m.initMapEntry(key, newEntry) } diff --git a/go/util/config.go b/go/util/config.go index 4cf1d7c64..dc8bac46f 100644 --- a/go/util/config.go +++ b/go/util/config.go @@ -1,3 +1,5 @@ +package util + // Copyright 2011 Numerotron Inc. // Use of this source code is governed by an MIT-style license // that can be found in the LICENSE file. @@ -6,7 +8,6 @@ // Contact us on twitter with any questions: twitter.com/stat_hat // The jconfig package provides a simple, basic configuration file parser using JSON. -package util import ( "bytes" diff --git a/go/util/file_util.go b/go/util/file_util.go index 30e24f001..ab1453395 100644 --- a/go/util/file_util.go +++ b/go/util/file_util.go @@ -26,8 +26,8 @@ func TestFolderWritable(folder string) (err error) { func Readln(r *bufio.Reader) ([]byte, error) { var ( - isPrefix bool = true - err error = nil + isPrefix = true + err error line, ln []byte ) for isPrefix && err == nil { |
