Code Monkey home page Code Monkey logo

Comments (3)

mvdan avatar mvdan commented on June 3, 2024

I completely missed this issue, apologies!

I can't seem to reproduce this issue. In fact, I use benchinit -r cmd/go quite regularly these days.

When you get the error, could you try grabbing the generated file to see what's on that line?

Could you also test on Go 1.12? If it still happens there, could you try reproducing the error in a Docker container? That way, I'll be able to reproduce the issue too.

from benchinit.

cuonglm avatar cuonglm commented on June 3, 2024

@mvdan I can't reproduce with go 1.12, but does with go1.11.5. With docker image:

$ docker run --rm -it golang:1.11.5 bash
root@c7a34ad5999e:~# go get -u mvdan.cc/benchinit 
root@c7a34ad5999e:~# benchinit cmd/go
# cmd/go_test [cmd/go.test]
/usr/local/go/src/cmd/go/benchinit_generated_test.go:35:6: missing function body
FAIL	cmd/go [build failed]
exit status 2

I did see the generated file, and the problem is from this line https://github.com/mvdan/benchinit/blob/master/main.go#L468

from benchinit.

mvdan avatar mvdan commented on June 3, 2024

Thanks, I just never tested this with Go 1.11 - I can reproduce the error. 1.12 has been out for over a month now, and I've just added support for master (1.13) in a44354a, so I don't think it's worth adding support for Go 1.11.

After all, this is an unsafe tool, so I think it's going to be enough work to maintain it on two major Go versions. Until 1.14 comes out, those versions will be 1.12 and 1.13. I'll clarify that in the README.

from benchinit.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.