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: idao.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/ddl/table"
	"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/version"
	"os"
	"path/filepath"
	"strings"
	"text/template"
)

var idaoTmpl = templates.EditableHeaderTmpl + `package dao

import (
	"context"
	"github.com/unionj-cloud/go-doudou/v2/toolkit/sqlext/query"
	"{{.EntityPackage}}"
)

type I{{.EntityName}}Dao interface {
	// single table CRUD operations
	Insert(ctx context.Context, data *entity.{{.EntityName}}) (int64, error)
	InsertIgnore(ctx co
    
func GenIDaoGo(entityPath string, t table.Table, folder ...string) error {
	var (
		err      error
		daopath  string
		f        *os.File
		tpl      *template.Template
		df       string
		dpkg     string
		pkColumn table.Column
	)
	df = "dao"
	if len(folder) > 0 {
		df = folder[0]
	}
	daopath = filepath.Join(filepath.Dir(entityPath), df)
	_ = os.MkdirAll(daopath, os.ModePerm)
	daofile := filepath.Join(daopath, "i"+strings.ToLower(t.Meta.Name)+"dao.go")
	if _, err = os.Stat(daofile); os.IsNotExist(err) {
		f, _ = os.Create(daofile)
		defer f.Close()
		dpkg = astutils.GetImportPath(entityPath)
		for _, column := range t.Columns {
			if column.Pk {
				pkColumn = column
				break
			}
		}
		tpl, _ = template.New("idao.go.tmpl").Parse(idaoTmpl)
		_ = tpl.Execute(f, struct {
			EntityName    string
			Version       string
			EntityPackage string
			PkField       astutils.FieldMeta
		}{
			EntityName:    t.Meta.Name,
			Version:       version.Release,
			EntityPackage: dpkg,
			PkField:       pkColumn.Meta,
		})
	} else {
		log.Warnf("file %s already exists", daofile)
	}
	return nil
}