mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
FIX incorrect usage about libnetwork.New() in README.md
libnetwork.New() should return a controller and an error. The example in README.md ignore the error now, which will let the codes can not be compiled by Go.
This commit is contained in:
parent
191d86c8dc
commit
951dcbe85e
1 changed files with 4 additions and 1 deletions
|
@ -18,7 +18,10 @@ There are many networking solutions available to suit a broad range of use-cases
|
|||
|
||||
```go
|
||||
// Create a new controller instance
|
||||
controller := libnetwork.New()
|
||||
controller, err := libnetwork.New()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
// Select and configure the network driver
|
||||
networkType := "bridge"
|
||||
|
|
Loading…
Add table
Reference in a new issue