Skip to content

Commit a652248

Browse files
committed
Fumpted the go
1 parent 379ec21 commit a652248

File tree

4 files changed

+2
-11
lines changed

4 files changed

+2
-11
lines changed

examples/appendices/simple.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ package main
22

33
import (
44
"fmt"
5-
wasmer "github.com/wasmerio/wasmer-go/wasmer"
65
"io/ioutil"
6+
7+
wasmer "github.com/wasmerio/wasmer-go/wasmer"
78
)
89

910
func main() {

examples/example_exports_function_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ func ExampleFunction() {
8787
// statically typed Rust values of type `i32` and `i32`. The
8888
// result, in this case particular case, in a unit of type `i32`.
8989
result, err = sumNative(3, 4)
90-
9190
if err != nil {
9291
panic(fmt.Sprintln("Failed to call the `sum` function natively:", err))
9392
}

examples/example_exports_global_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ func ExampleGlobal_Set() {
115115
}
116116

117117
oneValue, err = getOne()
118-
119118
if err != nil {
120119
panic(fmt.Sprintln("Failed to call the `get_one` function:", err))
121120
}
@@ -133,27 +132,23 @@ func ExampleGlobal_Set() {
133132
}
134133

135134
_, err = setSome(float32(21.0))
136-
137135
if err != nil {
138136
panic(fmt.Sprintln("Failed to call the `set_some` function:", err))
139137
}
140138

141139
someValue, err = some.Get()
142-
143140
if err != nil {
144141
panic(fmt.Sprintln("Failed to get the `some` global value:", err))
145142
}
146143

147144
fmt.Printf("`some` value after `set_some`: %.1f\n", someValue)
148145

149146
err = some.Set(float32(42.0), wasmer.F32)
150-
151147
if err != nil {
152148
panic(fmt.Sprintln("Failed to set the `some` global value:", err))
153149
}
154150

155151
someValue, err = some.Get()
156-
157152
if err != nil {
158153
panic(fmt.Sprintln("Failed to get the `some` global value:", err))
159154
}

examples/example_memory_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,11 @@ func ExampleMemory() {
132132
memAddr := 0x2220
133133
val := 0xFEFEFFE
134134
_, err = setAt(memAddr, val)
135-
136135
if err != nil {
137136
panic(fmt.Sprintln("Failed to call the `set_at` function:", err))
138137
}
139138

140139
result, err = getAt(memAddr)
141-
142140
if err != nil {
143141
panic(fmt.Sprintln("Failed to call the `get_at` function:", err))
144142
}
@@ -151,13 +149,11 @@ func ExampleMemory() {
151149
memAddr = (pageSize * 2) - int(unsafe.Sizeof(val))
152150
val = 0xFEA09
153151
_, err = setAt(memAddr, val)
154-
155152
if err != nil {
156153
panic(fmt.Sprintln("Failed to call the `set_at` function:", err))
157154
}
158155

159156
result, err = getAt(memAddr)
160-
161157
if err != nil {
162158
panic(fmt.Sprintln("Failed to call the `get_at` function:", err))
163159
}

0 commit comments

Comments
 (0)