Fix some error
This commit is contained in:
@@ -80,12 +80,12 @@ Write the following content to main.go.
|
||||
package main
|
||||
|
||||
import (
|
||||
"mymath"
|
||||
"fmt"
|
||||
"mymath"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Printf("Hello, world. Sqrt(2) = %v\n", mymath.Sqrt(2))
|
||||
fmt.Printf("Hello, world. Sqrt(2) = %v\n", mymath.Sqrt(2))
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -89,9 +89,9 @@ var isActive bool // global variable
|
||||
var enabled, disabled = true, false // omit type of variables
|
||||
|
||||
func test() {
|
||||
var available bool // local variable
|
||||
valid := false // brief statement of variable
|
||||
available = true // assign value to variable
|
||||
var available bool // local variable
|
||||
valid := false // brief statement of variable
|
||||
available = true // assign value to variable
|
||||
}
|
||||
```
|
||||
### Numerical types
|
||||
|
||||
Reference in New Issue
Block a user