Go - Base Path (Package Root)

Card Puncher Data Processing

About

The base path is the root path of (custom|user) package (ie not go standard library or other external libraries)

Syntax

hostname.extension/path

For example: if you have a GitHub account at github.com/user, you can choose it as base path. The go tool will be able to locate your code.

Redirection

base-path as:

  • mygo.domain.com

redirect to:

  • github hosting

Example:

<!DOCTYPE html>
<html>
    <body>
        <ul>
	     <li>myPackage - github.com/path</li>            
             <!-- Example from https://go.uber.org/ -->
	     <li>atomic - github.com/uber-go/atomic</li>
	</ul>
    </body>
</html>





Discover More
Card Puncher Data Processing
Go - Getting Started (Hello World)

Installation: Create a base path below the src directory of the workspace Create below the base path, your package directory and it the below source file Source hello.go Compile it ...
Card Puncher Data Processing
Go - Installation

Install the go binary in the default location Create a directory workspace with the following subdirectory src (Go source files), pkg (Package objects) bin (Executable commands). Set up the...
Card Puncher Data Processing
Go - Package (Import)

Package in Go. Go treats files in a single directory as belonging to one package as long as they all have the same name in their package declarations. Go code is organized into packages (similar to libraries...



Share this page:
Follow us:
Task Runner