Skip to content

Commit

Permalink
Added link to Go Playground
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanb authored Mar 6, 2024
1 parent 83f920e commit 1f33cae
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,26 @@ Specification: https://wiki.openstreetmap.org/wiki/Shortlink

```go
package main
import "github.com/stefanb/osmshortlink-go"

import (
"fmt"

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

func main() {
shortlink, err := osmshortlink.Create(46.05141, 14.50604, 17)
if err != nil {
panic(err)
}
fmt.Println(shortlink)
shortlink, err := osmshortlink.Create(46.05141, 14.50604, 17)
if err != nil {
panic(err)
}
fmt.Println(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)

### Command-line tool

You can download pre-built binaries for various platforms from [latest release](https://github.com/stefanb/osmshortlink-go/releases/latest).
Expand Down

0 comments on commit 1f33cae

Please sign in to comment.