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

  1. package main
    
    import (
    	"fmt"
    
    	"{REMOTE}/{USERNAME}/mystrings"
    )
    
    func main() {
    	fmt.Println(mystrings.Reverse("hello world"))
    }
    
  2. 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.

  3. go build
    ./hellogo
    

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