You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: convert_hexadecimal_to_octal.go
    path of file: ./repos/program/program/convert-hexadecimal-to-octal
    
    the code of the file until where you have to start completion: package main

import (
	"fmt"
	"os"
	"strconv"
)

func main() {
	var hex string
	fmt.Scanln(&hex)

	// first convert to decimal
	decimal, err :
    
func main() {
	var hex string
	fmt.Scanln(&hex)

	// first convert to decimal
	decimal, err := strconv.ParseInt(hex, 16, 64)

	if err != nil {
		fmt.Errorf("could not convert hex: %v to octal", hex)
		os.Exit(1)
	}

	// convert the decimal to octal
	oct := fmt.Sprintf("%o", decimal)
	fmt.Printf("the octal for hex: %v is oct: %v \n", hex, oct)
}