Skip to content

Commit

Permalink
small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
sboehmann committed Dec 10, 2016
1 parent 8f0bc58 commit 4e1ddda
Show file tree
Hide file tree
Showing 5 changed files with 629 additions and 606 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ language: go
sudo: false

go:
- 1.5
- 1.6
- 1.7
- 1.x
- tip

script:
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,20 @@ And now a simple program that uses these variables:
package main

import (
"github.com/sboehmann/envconf"
"io"
"net/http"
"github.com/sboehmann/envconf"
"io"
"net/http"
)

func message(w http.ResponseWriter, r *http.Request) {
io.WriteString(w, envconf.GetString("MESSAGE"))
value, _ := envconf.GetString("MESSAGE")
io.WriteString(w, value)
}

func main() {
envconf.SetPrefix("MY_")
envconf.SetPrefix("MY_")

http.HandleFunc("/", message)
http.ListenAndServe(":"+envconf.MustGetString("PORT"), nil)
http.HandleFunc("/", message)
http.ListenAndServe(":"+envconf.MustGetString("PORT"), nil)
}
```
Loading

0 comments on commit 4e1ddda

Please sign in to comment.