Skip to content

Commit

Permalink
Docs: simplified example
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanb authored May 1, 2024
1 parent 7a20a97 commit cfebe75
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,20 @@ Specification: https://wiki.openstreetmap.org/wiki/Shortlink
```go
package main

import (
"fmt"

"github.com/stefanb/osmshortlink-go"
)
import "github.com/stefanb/osmshortlink-go"

func main() {
shortlink, err := osmshortlink.Create(46.05141, 14.50604, 17)
if err != nil {
panic(err)
}
fmt.Println(shortlink)
print(shortlink)
}
```

Prints: [`https://osm.org/go/0Ik3VNr_A-?m`](https://osm.org/go/0Ik3VNr_A-?m)

[Try it in Go playground](https://go.dev/play/p/xFQrtmFwMPa)
[Try it in Go playground](https://go.dev/play/p/mObcbRyGU9E)

### Command-line tool

Expand Down

0 comments on commit cfebe75

Please sign in to comment.