Created
August 1, 2019 15:43
-
-
Save padurean/2fe263929c2886b30650760e85a67e57 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example of how third-party imports and multiple files can be used in Go playground | |
package main | |
import ( | |
"fmt" | |
"github.com/common-nighthawk/go-figure" | |
"your.universe/worlds" | |
) | |
func main() { | |
worldOf := worlds.WorldOf("GoT") | |
myFigure := figure.NewFigure(fmt.Sprintf("Hello, %s!", worldOf), "", true) | |
myFigure.Print() | |
} | |
-- go.mod -- | |
module your.universe | |
-- worlds/world.go -- | |
package worlds | |
import "fmt" | |
func WorldOf(name string) string { | |
return fmt.Sprintf("World of %s", name) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment