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: golang.go
    path of file: ./repos/tabtoy/v2/printer
    
    the code of the file until where you have to start completion: package printer

import (
	"bytes"
	"fmt"
	"go/parser"
	"go/printer"
	"go/token"
	"text/template"

	"github.com/davyxu/tabtoy/v2/i18n"
	"github.com/davyxu/tabtoy/v2/model"
)

const goTemplate = `// Generated by github.com/davyxu/tabtoy
// Version: {{.ToolVersion}}
// DO NOT EDIT!!
package {{.Package}}

import(	
	{{if .HasAnyIndex}}"fmt"{{end}}
	"encoding/json"
	"io/ioutil"
)
{{range $a, $en := .Enums}} 
// Defined in table: {{$en.DefinedTable}}
type {{$en.Name}} int32
const (	
{{range .GoFields}}
	{{.Comment}}
	{{$en.Name}}_{{.Name}} {{$en.Name}} = {{.Number}}
{{end}}
)
var (
{{$en.Name}}MapperValueByName = map[string]int32{ {{range .GoFields}}
	"{{.Name}}": {{.Number}}, {{end}}
}

{{$en.Name}}MapperNameByValue = map[int32]string{ {{range .GoFields}}
	{{.Number}}: "{{.Name}}" , {{end}}
}

{{$en.Name}}CommentByValue = map[int32]string{ {{range .GoFields}}
	{{.Number}}: "{{.RawComment}}" , {{end}}
}

)

func (self {{$en.Name}}) String() string {
	name, _ := {{$en.Na
    
func collectAllStructInfo(g *Globals, fm *goFileModel) {

	// 遍历所有类型
	for _, d := range g.FileDescriptor.Descriptors {

		// 这给被限制输出
		if !d.File.MatchTag(".go") {
			log.Infof("%s: %s", i18n.String(i18n.Printer_IgnoredByOutputTag), d.Name)
			continue
		}

		structM := &goStructModel{Descriptor: d}

		// 遍历字段
		for index, fd := range d.Fields {

			// 对CombineStruct的XXDefine对应的字段
			if d.Usage == model.DescriptorUsage_CombineStruct {

				// 这个字段被限制输出
				if fd.Complex != nil && !fd.Complex.File.MatchTag(".go") {
					continue
				}

				if fd.Complex != nil && fd.Complex.File.Pragma.GetBool("Vertical") {
					fm.VerticalFields = append(fm.VerticalFields, &goFieldModel{FieldDescriptor: fd})
				}
			}

			field := &goFieldModel{FieldDescriptor: fd}

			switch d.Kind {
			case model.DescriptorKind_Struct:
				field.Number = index + 1
			case model.DescriptorKind_Enum:
				field.Number = int(fd.EnumValue)
			}

			structM.GoFields = append(structM.GoFields, field)

		}

		switch d.Kind {
		case model.DescriptorKind_Struct:
			fm.Structs = append(fm.Structs, structM)
		case model.DescriptorKind_Enum:
			fm.Enums = append(fm.Enums, structM)
		}

	}
}