day4 go

72 阅读1分钟
  1. Ending a file's name with _test.go tells the go test command that this file contains test functions.

Test function names have the form TestName, where Name says something about the specific test.

The go test command executes test functions (whose names begin with Test) in test files (whose names end with _test.go)

  1. A standalone program (as opposed to a library) is always in package main.

In Gin, the colon preceding an item in the path signifies that the item is a path parameter.