Get
should return a value RVV-A0006 33// GetPic()
34// }
35
36func GetPic(w http.ResponseWriter, _ *http.Request) { 37 // err := godotenv.Load(filepath.Join("api/.env"))
38 // fmt.Println("Loading .env file", err)
39 // if err != nil { log.Fatal("Error loading .env file") }
Typically, functions with names prefixed with Get are supposed to return a value.
func GetData(n int) {
fmt.Println(10 - n)
}
func GetData(n int) int {
fmt.Println(10 - n)
return 10 - n
}