10 examples of 'go step' in Go

Every line of 'go step' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Go code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
47func (d *Director) Step() {
48 gl.Clear(gl.COLOR_BUFFER_BIT)
49 timestamp := glfw.GetTime()
50 dt := timestamp - d.timestamp
51 d.timestamp = timestamp
52 if d.view != nil {
53 d.view.Update(timestamp, dt)
54 }
55}
174func (t *T) Step(s Op) (op Op) {
175 defer func() {
176 r := recover()
177 if r == nil {
178 return
179 }
180
181 errmsg := fmt.Sprintf("%v", r)
182 t.code = list.New(sym.New("throw"), str.New(errmsg))
183
184 op = t.PushOp(Action(EvalCommand))
185 }()
186
187 if debug {
188 print("Stack: ")
189
190 for p := t.stack; p != nil && p.op != nil; p = p.stack {
191 print(opString(p.op))
192 print(" ")
193 }
194
195 println("")
196 print("Dump: ")
197
198 for p := t.dump; p != pair.Null; p = pair.Cdr(p) {
199 c := pair.Car(p)
200 if c == nil {
201 print(" ")
202 } else {
203 print(pair.Car(p).Name())
204 print(" ")
205 }
206 }
207
208 println("")
209 print("Code: ")
210
211 println(literal.String(t.code))
212
213 println("")
214 }
215
216 op = s.Perform(t)
217
218 return op
219}
50func (s *Spinner) Step() {
51 if IsTerminal {
52 s.step = (s.step + 1) % (len(s.steps) - 1)
53 fmt.Fprint(os.Stderr, s.line())
54 }
55}
101func (r *tickRateLimiter) step() bool {
102 select {
103 case <-r.ticker:
104 r.increment()
105 return true
106 case <-r.stop:
107 return false
108 }
109}
159func (ev *FSAEnv) Step() bool {
160 ev.Epoch.Same() // good idea to just reset all non-inner-most counters at start
161 ev.NextState()
162 ev.Trial.Incr()
163 ev.Tick.Incr()
164 if ev.AState.Prv == 0 {
165 ev.Tick.Init()
166 if ev.Seq.Incr() {
167 ev.Epoch.Incr()
168 }
169 }
170 return true
171}
86func (vm *VM) Step() {
87 ctx := vm.context()
88 instr := ctx.NextInstruction()
89 vm.exec(ctx, instr)
90}
47func (console *Console) Step() int {
48 cpuCycles := console.CPU.Step()
49 ppuCycles := cpuCycles * 3
50 for i := 0; i < ppuCycles; i++ {
51 console.PPU.Step()
52 console.Mapper.Step()
53 }
54 for i := 0; i < cpuCycles; i++ {
55 console.APU.Step()
56 }
57 return cpuCycles
58}
54func (*NoopModel) Step(state interface{}, input interface{}, output interface{}) (bool, interface{}) {
55 return true, state
56}
111func (ft *FixedTable) Step() bool {
112 ft.Epoch.Same() // good idea to just reset all non-inner-most counters at start
113
114 if ft.Trial.Incr() { // if true, hit max, reset to 0
115 ft.PermuteOrder()
116 ft.Epoch.Incr()
117 }
118 ft.SetTrialName()
119 ft.SetGroupName()
120 return true
121}
79func (l *Life) Step() {
80 // Update the state of the next field (b) from the current field (a).
81 for y := 0; y < l.h; y++ {
82 for x := 0; x < l.w; x++ {
83 l.b.Set(x, y, l.a.Next(x, y))
84 }
85 }
86 // Swap fields a and b.
87 l.a, l.b = l.b, l.a
88}

Related snippets