Skip to content

Commit

Permalink
readme: update usage
Browse files Browse the repository at this point in the history
  • Loading branch information
demget committed Apr 20, 2020
1 parent 519002b commit c5ac961
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,17 @@ Generate a regular public.gen.go file, but include all *.wasm files:

How broccoli is used in the user code:
```go
//go:generate broccoli -src=testdata,others -o assets
//go:generate broccoli -src=public,others -o assets

func init() {
br.Walk("testdata", func(path string, info os.FileInfo, err error) error {
br.Walk("public", func(path string, info os.FileInfo, err error) error {
// walk...
return nil
})
}

func main() {
server := http.FileServer(br)
http.ListenAndServe(":8080", server)
http.ListenAndServe(":8080", br.Serve("public"))
}
```

Expand Down

0 comments on commit c5ac961

Please sign in to comment.