mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 01:21:38 +08:00
fix: coding style and file format for all example.
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var orig string = "666"
|
||||
var an int
|
||||
var newS string
|
||||
|
||||
fmt.Printf("The size of ints is: %d\n", strconv.IntSize)
|
||||
|
||||
an, _ = strconv.Atoi(orig)
|
||||
fmt.Printf("The integer is: %d\n", an)
|
||||
an = an + 5
|
||||
newS = strconv.Itoa(an)
|
||||
fmt.Printf("The new string is: %s\n", newS)
|
||||
}
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var orig string = "666"
|
||||
var an int
|
||||
var newS string
|
||||
|
||||
fmt.Printf("The size of ints is: %d\n", strconv.IntSize)
|
||||
|
||||
an, _ = strconv.Atoi(orig)
|
||||
fmt.Printf("The integer is: %d\n", an)
|
||||
an = an + 5
|
||||
newS = strconv.Itoa(an)
|
||||
fmt.Printf("The new string is: %s\n", newS)
|
||||
}
|
||||
|
Reference in New Issue
Block a user