Skip to content

Commit 6a5c90d

Browse files
authored
docs: fix README.md (#7)
1 parent 6a73856 commit 6a5c90d

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,21 @@ Use ```-help``` to see additional options
1818
## Usage as a library
1919

2020
```go
21+
package main
22+
2123
import (
22-
"github.com/murfffi/getaduck"
23-
"fmt"
24+
"fmt"
25+
26+
"github.com/murfffi/getaduck/download"
2427
)
2528

2629
func main() {
27-
// Download the latest DuckDB release for your platform
28-
duckdbPath, err := getaduck.Download(getaduck.Options{})
29-
if err != nil {
30-
panic(err)
31-
}
32-
fmt.Println("Downloaded DuckDB to:", duckdbPath)
30+
// Download the latest DuckDB release for your platform
31+
res, err := download.Do(download.DefaultSpec())
32+
if err != nil {
33+
panic(err)
34+
}
35+
fmt.Println("Downloaded DuckDB to:", res.OutputFile)
3336
}
3437
```
3538

0 commit comments

Comments
 (0)