go - hello world!

Install go locale

Installation method (if not, follow the steps of the rookie tutorial to install):
yum search go
yum install ***

Novice tutorial installation method:
go environment installation

hello world

package main

import "fmt"

// 1. func 关键字
// 2. return_value 函数返回值,无返回值则省略
// 3. func_name 函数名以及参数

func main(){
    
    
    fmt.Println("hello!")
}

  1. Introduction of formatted output import "fmt"
  2. Define the syntax format of the function

Guess you like

Origin blog.csdn.net/qq_39378657/article/details/112619557