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: flags.go
    path of file: ./repos/gojq/cli
    
    the code of the file until where you have to start completion: package cli

import (
	"fmt"
	"reflect"
	"strconv"
	"strings"
)

func parseFlags(args []string, opts any) ([]string,
    
func formatFlags(opts any) string {
	val := reflect.ValueOf(opts).Elem()
	typ := val.Type()
	var sb strings.Builder
	sb.WriteString("Command Options:\n")
	for i, l := 0, typ.NumField(); i < l; i++ {
		tag := typ.Field(i).Tag
		if i == l-1 {
			sb.WriteString("\nHelp Option:\n")
		}
		sb.WriteString("  ")
		var short bool
		if flag, ok := tag.Lookup("short"); ok {
			sb.WriteString("-")
			sb.WriteString(flag)
			short = true
		} else {
			sb.WriteString("  ")
		}
		m := sb.Len()
		if flag, ok := tag.Lookup("long"); ok {
			if short {
				sb.WriteString(", ")
			} else {
				sb.WriteString("  ")
			}
			sb.WriteString("--")
			sb.WriteString(flag)
			switch val.Field(i).Kind() {
			case reflect.Bool:
				sb.WriteString(" ")
			case reflect.Map:
				if strings.HasSuffix(flag, "file") {
					sb.WriteString(" name file")
				} else {
					sb.WriteString(" name value")
				}
			default:
				if _, ok = tag.Lookup("positional"); !ok {
					sb.WriteString("=")
				}
			}
		} else {
			sb.WriteString("=")
		}
		sb.WriteString("                       "[:24-sb.Len()+m])
		sb.WriteString(tag.Get("description"))
		sb.WriteString("\n")
	}
	return sb.String()
}