In this Getting Started with Golang, we will learn how to publish Golang Package to Github and use this demo package from your local development using the "go get -u github.com/maharlikanscode/mkcpack" built-in command in Golang programming language with step by step guide.
#MaharlikansCode
#PublishGoPackageToGithub
#Golang
#LifeAsSoftwareDeveloper
#Maharlikans
#FilipinoSoftwareDeveloper
If you go with extra mile for buying me a cup of coffee, I appreciate it guys: https://ko-fi.com/maharlikanscode
Source code for the mkcpack package:
package mkcpack
// AddIntNum is to add two integer numbers
func AddIntNum(num1, num2 int) int {
return num1 + num2
}
Install the new mkcpack package for this demo:
go get -u github.com/maharlikanscode/mkcpack
Test the mkcpack package with a simple main.go:
package main
import (
"fmt"
"github.com/maharlikanscode/mkcpack"
)
func main() {
val := mkcpack.AddIntNum(1, 2)
fmt.Println("val: ", val)
}