golang 笔记

A Tour of Go

In Go, the := operator is a shortcut for declaring and initializing a variable in one line (Go uses the value on the right to determine the variable's type). Taking the long way, you might have written this as:

var message string
message = fmt.Sprintf("Hi, %v. Welcome!", name)
// message := fmt.Sprintf("Hi, %v. Welcome!", name)
// var message = fmt.Sprintf("Hi, %v. Welcome!", name)

posted on 2023-04-24 15:09  明天有风吹  阅读(15)  评论(0编辑  收藏  举报

导航

+V atob('d2h5X251bGw=')

请备注:from博客园