Skip to content

Commit

Permalink
Add method for creating empty atomic strings
Browse files Browse the repository at this point in the history
  • Loading branch information
myleshorton committed Aug 18, 2015
1 parent 4b782e9 commit 36aa77a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/github.com/getlantern/flashlight/geolookup/geolookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,16 @@ var (
service *ui.Service
client atomic.Value
cfgMutex sync.Mutex
country atomic.Value
ip atomic.Value
country = atomicString()
ip = atomicString()
)

func atomicString() atomic.Value {
var val atomic.Value
val.Store("")
return val
}

func GetIp() string {
return ip.Load().(string)
}
Expand Down

0 comments on commit 36aa77a

Please sign in to comment.