Centos7 installs the go language development environment

Install Golang environment under CentOS 64bit

Download and install Fedora EPEL installation source

# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

# yum install golang -y

Write the first go language demo , like all languages, everything starts with hello world

[root@bug ~]# cat hello.go

package main

import "fmt"                                                                                      

func main() {

    fmt.Println("Hello, World.")

}

do it

[root@bug ~]# go run hello.go

Hello, World.


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325972173&siteId=291194637