Method to install the Go language compiler on Mac OS

  • 2020-05-30 20:21:51
  • OfStack

I am using mac mini then in above installed sublime text2 plugin is still go sublime and go build that would not be introduced, two because already installed is introduced, the go mac os installation package can be directly under, download address is http: / / code google. com p/go/downloads list & # 63; q= OpSys-OSX + Type-Installer, talk to your own computer, download the corresponding one. Then directly install, after the installation or configuration environment variables, 1 - like linux is like this


 cd 
 ls -a # The user environment variable shown is .bashrc,unix Above is .bash_profile
 vim .bash_profile
 export PATH=/Users/widuu/golang:$PATH #1 Make sure to add the following $PATH I forgot to add it :$PATH As a result, the command is no longer available 
source .bash_profile

And then we'll write a code test 1


package main

import std "fmt"

type 1 personal  string

func main() {
 var  The woman  1 personal 
  The woman  = "1 Personal wife "
 std.Println( The woman )
 std.Println("hello word")
}

The result is one person's wife hello word which is proof that you can start playing

MAC OS basically does all the things that computers can do up here, you can do php android ios and so on, using linux's remote connection
ssh root@192.168.1.14 # and enter your password


Related articles: