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: genrequest.go
    path of file: ./repos/go-zero/tools/goctl/api/tsgen
    
    the code of the file until where you have to start completion: package tsgen

import (
	_ "embed"
	"os"
	"path/filepath"

	"github.com/zeromicro/go-zero/tools/goct
    
func genRequest(dir string) error {
	abs, err := filepath.Abs(dir)
	if err != nil {
		return err
	}

	filename := filepath.Join(abs, "gocliRequest.ts")
	if pathx.FileExists(filename) {
		return nil
	}

	return os.WriteFile(filename, []byte(requestTemplate), 0644)
}