fix: coding style and file format for chapter 7.

This commit is contained in:
Bo-Yi Wu
2017-02-11 12:26:05 +08:00
parent d9041c7fc3
commit e6d601d3a1
15 changed files with 375 additions and 375 deletions

View File

@@ -1,15 +1,16 @@
package main
import "fmt"
func main() {
str := "Google"
str2 := Split2(str)
fmt.Printf("The string %s transformed is: %s\n", str, str2)
}
func Split2(s string) string {
mid := len(s) / 2
return s[mid:] + s[:mid]
}
// Output: The string Google transformed is: gleGoo
package main
import "fmt"
func main() {
str := "Google"
str2 := Split2(str)
fmt.Printf("The string %s transformed is: %s\n", str, str2)
}
func Split2(s string) string {
mid := len(s) / 2
return s[mid:] + s[:mid]
}
// Output: The string Google transformed is: gleGoo