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: entity.go
    path of file: ./repos/go-doudou/cmd/internal/ddl/codegen
    
    the code of the file until where you have to start completion: package codegen

import (
	log "github.com/sirupsen/logrus"
	"github.com/unionj-cloud/go-doudou/v2/cmd/internal/templates"
	"github.com/unionj-cloud/go-doudou/v2/toolkit/astutils"
	"github.com/unionj-cloud/go-doudou/v2/toolkit/templateutils"
	"github.com/unionj-cloud/go-doudou/v2/version"
	"os"
	"path/filepath"
	"strings"
)

var entityTmpl = templates.EditableHeaderTmpl + `package entity

import (
	"time"

	"github.com/s
    
func GenEntityGo(dpath string, entity astutils.StructMeta) {
	var (
		err error
		f   *os.File
	)
	_ = os.MkdirAll(dpath, os.ModePerm)
	dfile := filepath.Join(dpath, strings.ToLower(entity.Name)+".go")
	if _, err = os.Stat(dfile); os.IsNotExist(err) {
		f, _ = os.Create(dfile)
		defer f.Close()
		var source string
		entity.Version = version.Release
		source, _ = templateutils.String("entity.go.tmpl", entityTmpl, entity)
		astutils.FixImport([]byte(source), dfile)
	} else {
		log.Warnf("file %s already exists", dfile)
	}
}