Ran gofmt

This commit is contained in:
Sasha Koshka 2022-09-08 14:43:19 -04:00
parent b0068336cd
commit a52e5d3426
5 changed files with 81 additions and 75 deletions

1
cmd/main.go Normal file
View File

@ -0,0 +1 @@
package main

View File

@ -118,7 +118,6 @@ func TestComparison(test *testing.T) {
PUSH, 54, PUSH, 54,
PUSH, 6, PUSH, 6,
NEQ, NEQ,
}, nil, test) }, nil, test)
neqResult := machine.Pop() neqResult := machine.Pop()

View File

@ -1,3 +1,4 @@
//go:build ignore
// +build ignore // +build ignore
package main package main
@ -25,7 +26,9 @@ func main () {
machine.Register(0, read) machine.Register(0, read)
machine.Register(1, write) machine.Register(1, write)
err := machine.Execute(0) err := machine.Execute(0)
if err != nil { panic(err.Error()) } if err != nil {
panic(err.Error())
}
} }
func read(machine *cre.Machine[int]) (stop bool) { func read(machine *cre.Machine[int]) (stop bool) {

View File

@ -1,3 +1,4 @@
//go:build ignore
// +build ignore // +build ignore
package main package main
@ -127,7 +128,9 @@ func main () {
machine.Register(1, write) machine.Register(1, write)
err := machine.Execute(0) err := machine.Execute(0)
if err != nil { panic(err.Error()) } if err != nil {
panic(err.Error())
}
} }
func read(machine *cre.Machine[int]) (stop bool) { func read(machine *cre.Machine[int]) (stop bool) {