Skip to content

Commit 97eba6b

Browse files
committed
Add Example_playWithArgs
1 parent e82e49d commit 97eba6b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

online_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,11 @@ func Example_play() {
99
// Output:
1010
// 2009-11-10 23:00:00 +0000 UTC m=+0.000000001
1111
}
12+
13+
// Show "goeval -play", with arguments values sent with the program code
14+
func Example_playWithArgs() {
15+
goeval(`-play`, `fmt.Println(os.Args[1])`, `toto`)
16+
17+
// Output:
18+
// toto
19+
}

0 commit comments

Comments
 (0)