INNER CODE UNIT · Go

main

gameknife/gkNextEngine · tools/gnb/cmd/gnb/main.go:41

func main() {
	repoRootCandidates := []string{"."}
	if explicit := explicitRepoRoot(); explicit != "" {
		repoRootCandidates = []string{explicit}
	}
	if executable, err := os.Executable(); err == nil {
		if resolvedExecutable, resolveErr := filepath.EvalSymlinks(executable); resolveErr == nil {
			executable = resolvedExecutable
		}
		repoRootCandidates = append(repoRootCandidates, filepath.Dir(executable))
	}
	repoRoot, repoErr := config.FindRepoRootFromCandidates(repoRootCandidates...)
	var cfg config.Config
	if repoErr == nil {
		var err error
		cfg, err = config.Load(repoRoot)
		if err != nil {
			fatal(err)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…