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: main.go
    path of file: ./repos/coder/scripts/ci-report
    
    the code of the file until where you have to start completion: package main

import (
	"bufio"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"os"
	"strings"
	"time"

	"golang.org/x/exp/slices"
	"golang.org/x/xerrors"

	"github.com/coder/coder/v2/coderd/util/slice"
)

func main() {
	if len(os.Args) != 2 {
		_, _ = fmt.Println("usage: ci-report <gotests.json>")
		os.Exit(1)
	}
	name := os.Args[1]

	goTests, err := parseGoTestJSON(name)
	if err != nil {
		_, _ = fmt.Printf("error parsing gotestsum report: %v", err)
		os.Exit(1)
	}

	rep, err := parseCIReport(goTests)
	if err != nil {
		_, _ = fmt.Printf("error parsing ci report: %v
    
func parseGoTestJSON(name string) (GotestsumReport, error) {
	f, err := os.Open(name)
	if err != nil {
		return GotestsumReport{}, xerrors.Errorf("error opening gotestsum json file: %w", err)
	}
	defer f.Close()

	dec := json.NewDecoder(f)
	var report GotestsumReport
	for {
		var e GotestsumReportEntry
		err = dec.Decode(&e)
		if errors.Is(err, io.EOF) {
			break
		}
		if err != nil {
			return GotestsumReport{}, xerrors.Errorf("error decoding json: %w", err)
		}
		e.Package = strings.TrimPrefix(e.Package, "github.com/coder/coder/")
		report = append(report, e)
	}

	return report, nil
}