Initializing a module

Report a typo

Bob has been working on a Go program named emoji-menu. This program outputs into the terminal the menu of the restaurant he works in using emojis.

He has already written all the code in his main.go file, however, he hasn't started using modules yet, and hasn't installed any of the package dependencies his program requires.

Below you will see the contents of his main.go file:

package main

import (
    "github.com/kyokomi/emoji/v2"
)

func main() {
    emoji.Println("Galley Grub")
    emoji.Println("Krabby Patty :hamburger: - $2.00")
    emoji.Println("Krusty Combo :hamburger::fries::cup_with_straw: - $3.99\n")

    emoji.Println("Sides")
    emoji.Println("Kelp Fries :fries: - $1.99")
    emoji.Println("Kelp Soda :cup_with_straw: - $1.99")
    emoji.Println("Seaweed Salad :salad: - $1.50")
}

Can you help him out by selecting the proper commands he should execute to start using modules in his program and install the required package dependencies?

Select one or more options from the list
___

Create a free account to access the full topic