Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected EOF #26

Open
codergu64 opened this issue Oct 4, 2021 · 1 comment
Open

Unexpected EOF #26

codergu64 opened this issue Oct 4, 2021 · 1 comment

Comments

@codergu64
Copy link

Hey, you!
I'm learning GOLANG recently. For VUE package to GO, I tried to use Go Generate & Togo here, but output ERROR. I wanna know it happens whether my env or operation wrong?

Output following:

dist.go:3: error reading dist.go: unexpected EOF

Thanks for taking up your time!

@wuhan005
Copy link
Member

wuhan005 commented Oct 6, 2021

Try the following commands:

# build the frontend
yarn install && yarn build
# switch into `dist` folder
cd dist
# embed static files with togo
togo http -package dist -output dist_gen.go

Then a new dist_gen.go file should be created. I am not sure what the problem is.

However, Go 1.16 provides go embed which allows you to embed static files into the target binary. Cardinal will support this feature and togo will be deprecated soon. Read this article written in Chinese to get more information about go embed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants