We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Custom Package Continued

Let's use our new mystrings package in hellogo.

Assignment

package main

import (
	"fmt"

	"{REMOTE}/{USERNAME}/mystrings"
)

func main() {
	fmt.Println(mystrings.Reverse("hello world"))
}
module example.com/username/hellogo

go 1.26.0

replace example.com/username/mystrings v0.0.0 => ../mystrings

require example.com/username/mystrings v0.0.0

../mystrings tells go to look in the parent directory of hellogo for the mystrings sibling directory.

go build
./hellogo

Run and submit the CLI tests from the root of the main package.