Skip to content

panic: open ... no such file or directory #28

@MParvin

Description

@MParvin

When I run the command "git-scaffold init go-memorize" I get the following error:

panic: open /go/src/github.com/dcu/gin-scaffold/template/data/main.go.tmpl: no such file or directory

goroutine 1 [running]:
github.com/dcu/gin-scaffold/template.LoadTemplateFromFile({0xc00007c1c0?, 0x4be710?})
	/go/pkg/mod/github.com/dcu/gin-scaffold@v0.0.0-20170923021706-eb09c2f904d3/template/loader.go:18 +0x72
github.com/dcu/gin-scaffold/template.(*Builder).Template(0xc000052300)
	/go/pkg/mod/github.com/dcu/gin-scaffold@v0.0.0-20170923021706-eb09c2f904d3/template/builder.go:103 +0x2d
github.com/dcu/gin-scaffold/template.(*Builder).Write(0xc00007a140?, {0x594028, 0xc0000126d0}, {0x5426c0, 0xc000070140})
	/go/pkg/mod/github.com/dcu/gin-scaffold@v0.0.0-20170923021706-eb09c2f904d3/template/builder.go:110 +0x2d
github.com/dcu/gin-scaffold/template.(*Builder).WriteToPath(0xc000043da8?, {0xc00007a140, 0x1e}, {0x5426c0, 0xc000070140})
	/go/pkg/mod/github.com/dcu/gin-scaffold@v0.0.0-20170923021706-eb09c2f904d3/template/builder.go:130 +0x11f
github.com/dcu/gin-scaffold/command.(*InitCommand).installFile(0xc000070140, {0x0, 0x0}, {0x557329?, 0x0?}, {0xc0000185b0, 0xe})
	/go/pkg/mod/github.com/dcu/gin-scaffold@v0.0.0-20170923021706-eb09c2f904d3/command/init_command.go:90 +0xd9
github.com/dcu/gin-scaffold/command.(*InitCommand).Execute(0xc000070140, {0xc0000141a0?, 0x7ffdc3fdaeda?, 0x4?})
	/go/pkg/mod/github.com/dcu/gin-scaffold@v0.0.0-20170923021706-eb09c2f904d3/command/init_command.go:72 +0x308
main.main()
	/go/pkg/mod/github.com/dcu/gin-scaffold@v0.0.0-20170923021706-eb09c2f904d3/gin-scaffold.go:61 +0x196

I tried this on the following systems:

  • Ubuntu 22.04 LTS (go version go1.19.3 linux/amd64)
  • CentOS 7.9.2009 (go version go1.17.12 linux/amd64)
  • Docker image golang:1.19.3-alpine

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions