Update readme.md

This commit is contained in:
Alex Grin 2019-01-31 10:10:39 -05:00 committed by GitHub
parent d79ed15728
commit 6cd5deb884
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,6 +64,8 @@ grp.StopAndWait()
## Example
### Structure
```
type Server struct {
grp *stop.Group
@ -112,10 +114,11 @@ func (s *Server) Start(address string) error {
// listenAndServe blocks until the server is shut down, just like http.ListenAndServe()
return s.listenAndServe(l)
}
```
### Usage
// how this is used
```
s := NewServer()
log.Println("starting")
go s.Start("localhost:1234")