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: outline_command.go
    path of file: ./repos/podman/vendor/github.com/onsi/ginkgo/v2/ginkgo/outline
    
    the code of the file until where you have to start completion: package outline

import (
	"encoding/json"
	"fmt"
    
func outlineFile(args []string, format string) {
	if len(args) != 1 {
		command.AbortWithUsage("outline expects exactly one argument")
	}

	filename := args[0]
	var src *os.File
	if filename == stdinAlias {
		src = os.Stdin
	} else {
		var err error
		src, err = os.Open(filename)
		command.AbortIfError("Failed to open file:", err)
	}

	fset := token.NewFileSet()

	parsedSrc, err := parser.ParseFile(fset, filename, src, 0)
	command.AbortIfError("Failed to parse source:", err)

	o, err := FromASTFile(fset, parsedSrc)
	command.AbortIfError("Failed to create outline:", err)

	var oerr error
	switch format {
	case "csv":
		_, oerr = fmt.Print(o)
	case "indent":
		_, oerr = fmt.Print(o.StringIndent(indentWidth))
	case "json":
		b, err := json.Marshal(o)
		if err != nil {
			println(fmt.Sprintf("error marshalling to json: %s", err))
		}
		_, oerr = fmt.Println(string(b))
	default:
		command.AbortWith("Format %s not accepted", format)
	}
	command.AbortIfError("Failed to write outline:", oerr)
}