You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,6 +76,7 @@ Code style is just the first step. We have made many efforts to make the code mo
76
76
| package main<br><br>import "fmt"<br><br>func main() {<br> fmt.Println("Hi")<br>} | import "fmt"<br><br>fmt.Println("Hi")<br> | Program structure: Go+ allows omitting `package main` and `func main`|
77
77
| fmt.Println("Hi") | echo("Hi") | More builtin functions: It simplifies the expression of the most common tasks |
78
78
| fmt.Println("Hi") | echo "Hi" | Command-line style code: It reduces the number of parentheses in the code as much as possible, making it closer to natural language |
79
+
| name := "Ken"<br>fmt.Printf(<br> "Hi %s\n", name) | name := "Ken"<br>echo "Hi ${name}" |[Goodbye printf](doc/goodbye-printf.md), use `${expr}` in string literals |
79
80
| a := []int{1, 2, 3} | a := [1, 2, 3]| List literals |
80
81
| a = append(a, 4)<br>a = append(a, 5, 6, 7) | a <- 4<br>a <- 5, 6, 7 | Append values to a list |
81
82
| a := map[string]int{<br> "Monday": 1,<br> "Tuesday": 2,<br>} | a := {<br> "Monday": 1,<br> "Tuesday": 2,<br>} | Mapping literals |
0 commit comments