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/kcl/kclvm/runtime/tools/kclvm-runtime-gen-api
    
    the code of the file until where you have to start completion: // Copyright The KCL Authors. All rights reserved.

package main

import (
	"bytes"
	"flag"
	"fmt"
	"os"
	"path/filepath"
	"regexp"
	"sort"
	"strings"
	"text/template"
)

var (
	fl
    
func genCApi(specs []ApiSpec) string {
	tmpl, err := template.New("c-api").Parse(tmplCApi)
	if err != nil {
		panic(err)
	}

	var buf bytes.Buffer
	err = tmpl.Execute(&buf, specs)
	if err != nil {
		panic(err)
	}
	return fmtCode(buf.String())
}