Import package (third party) from GitHub
// package hosted on GitHub
package greetings
import "fmt"
// Hello returns a greeting for the named person.
func Hello(name string) string {
// Return a greeting that embeds the name in a message.
message := fmt.Sprintf("Hi, %v. Welcome!", name)
return message
}package main
import (
"fmt"
// we import the package here
"github.com/shariqkhan29/GoModule"
)
func main() {
// Get a greeting message and print it.
message := greetings.Hello("Gladys")
fmt.Println(message)
}Last updated