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: project.go
    path of file: ./repos/go-admin/adm
    
    the code of the file until where you have to start completion: package main

import (
	"bytes"
	"encoding/json"
	"errors"
	"fmt"
	"go/format"
	"io/ioutil"
	"os"
	"path/filepath"
	"runtime"
	"strings"
	"text/templ
    
func Init(c db.Connection) {
	orm, err = gorm.Open("`+p.DriverModule+`", c.GetDB("default"))

	if err != nil {
		panic("initialize orm failed")
	}
}
`), os.ModePerm))
	}

	checkError(ioutil.WriteFile("./logs/access.log", []byte{}, os.ModePerm))
	checkError(ioutil.WriteFile("./logs/info.log", []byte{}, os.ModePerm))
	checkError(ioutil.WriteFile("./logs/error.log", []byte{}, os.ModePerm))
	checkError(ioutil.WriteFile("./bootstrap.go", []byte(`package main`), os.ModePerm))

	if p.Theme == "sword" {
		checkError(ioutil.WriteFile("./pages/index.go", swordIndexPage, 0644))
	} else {
		checkError(ioutil.WriteFile("./pages/index.go", adminlteIndexPage, 0644))
	}

	if defaultLang == "cn" || p.Language == language.CN || p.Language == "cn" {
		checkError(ioutil.WriteFile("./main_test.go", mainTestCN, 0644))
		checkError(ioutil.WriteFile("./README.md", []byte(fmt.Sprintf(readmeCN, p.Port+"/"+p.Prefix)), 0644))
	} else {
		checkError(ioutil.WriteFile("./main_test.go", mainTest, 0644))
		checkError(ioutil.WriteFile("./README.md", []byte(fmt.Sprintf(readme, p.Port+"/"+p.Prefix)), 0644))
	}

	makefileContent := makefile
	if p.Driver == db.DriverSqlite {
		makefileContent = bytes.ReplaceAll(makefileContent, []byte("CGO_ENABLED=0"), []byte("CGO_ENABLED=1"))
	}

	checkError(ioutil.WriteFile("./Makefile", makefileContent, 0644))

	checkError(ioutil.WriteFile("./html/hello.tmpl", []byte(`<div class="hello">
    <h1>{{index . "msg"}}</h1>
</div>

<style>
    .hello {
        padding: 50px;
        width: 100%;
        text-align: center;
    }
</style>
`), 0644))

	checkError(ioutil.WriteFile("./tables/tables.go", []byte(`// This file is generated by GoAdmin CLI adm.
package tables

import "github.com/GoAdminGroup/go-admin/plugins/admin/modules/table"

// Generators is a map of table models.
//
// The key of Generators is the prefix of table info url.
// The corresponding value is the Form and Table data.
//
// http://{{config.Domain}}:{{Port}}/{{config.Prefix}}/info/{{key}}
//
// example:
//
// example end
//
var Generators = map[string]table.Generator{

	// generators end
}
`), 0644))

	// generate config json

	if cfgFile == "" {
		t, err := template.New("ini").Parse(admINI)
		checkError(err)
		buf := new(bytes.Buffer)
		checkError(t.Execute(buf, info))
		checkError(ioutil.WriteFile("./adm.ini", buf.Bytes(), 0644))
	}

	configByte, err := json.MarshalIndent(cfg, "", "	")
	configByte = bytes.ReplaceAll(configByte, []byte(`
	"logger": {
		"encoder": {},
		"rotate": {}
	},`), []byte{})
	configByte = bytes.ReplaceAll(configByte, []byte(`,
	"animation": {}`), []byte{})
	checkError(err)
	checkError(ioutil.WriteFile("./config.json", configByte, 0644))

}