Skip to content

Commit 487d1d6

Browse files
committed
README: document new go.dev related flags
1 parent 046b3ca commit 487d1d6

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,36 @@ $ goeval -i net/http -i _=github.com/mattn/go-sqlite3@latest -i github.com/dolme
5656
```
5757
-->
5858

59+
### [go.dev/play](https://go.dev/play)
60+
61+
Run your code on the Go Playground, and show output on the terminal:
62+
63+
```console
64+
$ goeval -play 'fmt.Println(time.Now())'
65+
2009-11-10 23:00:00 +0000 UTC m=+0.000000001
66+
```
67+
68+
Show the code sent to the Go Playground:
69+
70+
```console
71+
$ goeval -Eplay 'fmt.Println(time.Now())'
72+
package main
73+
74+
import (
75+
"fmt"
76+
"time"
77+
)
78+
79+
func main() {
80+
fmt.Println(time.Now())
81+
}
82+
```
83+
84+
Share the code on `go.dev`:
85+
```console
86+
$ goeval -share 'fmt.Println(time.Now())'
87+
https://go.dev/play/p/Z35Vf8gIg4Z
88+
```
5989

6090
## ⬇️ Install
6191

0 commit comments

Comments
 (0)