state

command
v1.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2019 License: GPL-2.0 Imports: 3 Imported by: 0

README

state

This example demonstrates that by keeping the same evalfilter instance between script-calls you can maintain state.

Usage

Compile via go build ., then launch the program. It will execute the script embedded within itself 20 times, and you'll see the result change:

go build . && ./state
0 -> false
1 -> false
2 -> false
3 -> false
4 -> false
5 -> false
6 -> false
7 -> false
8 -> false
9 -> false
10 -> true
11 -> true
12 -> true
13 -> true
14 -> true
15 -> true
16 -> true
17 -> true
18 -> true
19 -> true

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL