Skip to content

Commit 1f33cae

Browse files
authored
Added link to Go Playground
1 parent 83f920e commit 1f33cae

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,26 @@ Specification: https://wiki.openstreetmap.org/wiki/Shortlink
1717

1818
```go
1919
package main
20-
import "github.com/stefanb/osmshortlink-go"
20+
21+
import (
22+
"fmt"
23+
24+
"github.com/stefanb/osmshortlink-go"
25+
)
2126

2227
func main() {
23-
shortlink, err := osmshortlink.Create(46.05141, 14.50604, 17)
24-
if err != nil {
25-
panic(err)
26-
}
27-
fmt.Println(shortlink)
28+
shortlink, err := osmshortlink.Create(46.05141, 14.50604, 17)
29+
if err != nil {
30+
panic(err)
31+
}
32+
fmt.Println(shortlink)
2833
}
2934
```
3035

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

38+
[Try it in Go playground](https://go.dev/play/p/xFQrtmFwMPa)
39+
3340
### Command-line tool
3441

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

0 commit comments

Comments
 (0)