1
0
Fork 0

Readme fix #2

This commit is contained in:
Gregory Eremin 2015-08-29 20:44:48 +03:00
parent f56750bf3d
commit c7279f80d0
2 changed files with 10 additions and 3 deletions

View File

@ -36,10 +36,14 @@ Now we need to ask Secondly to take care of your configuration:
```go
var conf Config
secondly.Manage(&conf)
// or asynchronously
go secondly.Manage(&conf)
```
You'll probably want to know when configuration is loaded, so there's a handly
helper function just for that:
If you prefer to configure the app asynchronously then you'll probably want to
know when configuration is loaded, so there's a handly helper function just for
that:
```go
secondly.OnLoad(func(){
@ -53,7 +57,7 @@ configuration of your app. But this is not what you came for, right?
If you want a configuration GUI, simply start Secondly's web server on a port
you want.
```
```go
secondly.StartServer("", 5500)
```

View File

@ -171,6 +171,9 @@ func triggerCallbacks(oldConf, newConf interface{}) {
// Don't trigger callbacks on fist load
if !initialized {
initialized = true
if initFunc != nil {
initFunc()
}
return
}