Experience: is what you get soon after you need it.

Experience: is what you get soon after you need it.

****************Got the opportunity to pen a Book on Database Cloud Services.......More details to follow.***************

Title : Database Cloud Revealed
Publisher : Apress
Release Date : Jan-2021


My Cloud Certifications:

AWS Certified Solutions Architect Associate

Azure Certified Architect Expert

Azure Certified Architect

Azure Certified Administrator

Oracle Cloud Infrastructure 2018 Certified Architect Associate.

Oracle Cloud Infrastructure Classic 2018 Certified Architect Associate.

Oracle Database Cloud Administrator Certified Professional.

Oracle Database Cloud Service Operations Certified Associate.

Search This Blog

Thursday, October 8, 2015

How to install go on MAC

How to install
on MAC


Download it from → https://golang.org/dl/

Pick the OS.

Download the package

Open the downloaded package:

Click “Continue”

Select “all users” → Click “Continue”

Click “Instal”

Enter “Password” → Click “Instal Software”

Wait for the install to complete


That’s it you are done.

Package Details:

The package installs the Go distribution under  /usr/local/go.

shaiks@MAC$ls -lrt /usr/local/go/
total 168
drwxr-xr-x    7 root  wheel    238 Sep  8 21:31 pkg
drwxr-xr-x   15 root  wheel    510 Sep  8 21:31 misc
drwxr-xr-x    3 root  wheel    102 Sep  8 21:31 lib
-rw-r--r--    1 root  wheel   1150 Sep  8 21:31 favicon.ico
drwxr-xr-x   39 root  wheel   1326 Sep  8 21:31 doc
drwxr-xr-x    4 root  wheel    136 Sep  8 21:31 blog
drwxr-xr-x    5 root  wheel    170 Sep  8 21:31 bin
drwxr-xr-x   11 root  wheel    374 Sep  8 21:31 api
-rw-r--r--    1 root  wheel      7 Sep  8 21:31 VERSION
-rw-r--r--    1 root  wheel   1519 Sep  8 21:31 README.md
-rw-r--r--    1 root  wheel   1303 Sep  8 21:31 PATENTS
-rw-r--r--    1 root  wheel   1479 Sep  8 21:31 LICENSE
-rw-r--r--    1 root  wheel  28953 Sep  8 21:31 CONTRIBUTORS
-rw-r--r--    1 root  wheel   1107 Sep  8 21:31 CONTRIBUTING.md
-rw-r--r--    1 root  wheel  21146 Sep  8 21:31 AUTHORS
drwxr-xr-x  234 root  wheel   7956 Sep  8 21:32 test
drwxr-xr-x   63 root  wheel   2142 Sep  8 21:32 src
-rw-r--r--    1 root  wheel     26 Sep  8 21:32 robots.txt

The package should put the /usr/local/go/bin directory in your PATH environment variable. You may need to restart any open Terminal sessions for the change to take effect.

shaiks@MAC$echo $PATH

Create Project Workspace:

shaiks@MAC$mkdir $HOME/mygo
shaiks@MAC$echo "export GOPATH=$HOME/mygo" >> ~/.profile
shaiks@MAC$echo "export GOBIN=$GOPATH/bin" >> ~/.profile

shaiks@MAC$cat .profile | grep GO
export GOPATH=/Users/shaiksameer/mygo
export GOBIN=$GOPATH/bin

Test go:


shaiks@MAC$mkdir -p src/hello


Create a sample program
shaiks@MAC$vi /Users/shaiksameer/mygo/src/hello/hello.go
package main

import "fmt"

func main() {
   fmt.Printf("hello, world\n")

shaiks@MAC$cd ..

shaiks@MAC$go install src/hello/hello.go

It creates a bin directory and executable file called “hello” under bin directory.

Execute the little program from the bin dir:

hello, world

Or Use compile & run in single command.

shaiks@MAC$go run src/hello/hello.go
Mr. Sameer Shaik


No comments: