Giter Club home page Giter Club logo

Comments (5)

owenthereal avatar owenthereal commented on June 10, 2024

@kless Go compiler actually shouldn't compile the tasks into the final binary unless somewhere in your code is calling the task functions. I was told the Go linker would be able to do optimization like this. But I also replied on the Google post to clarify.

from gotask.

tredoe avatar tredoe commented on June 10, 2024

I'm using "godoc -http=:6060" in the directory of my package, and godoc is showing the comment of my task: func TaskBuildData(*task.T)

Really, it shows all variables and functions exported from the task file.

from gotask.

owenthereal avatar owenthereal commented on June 10, 2024

godoc actually hards code to exclude _test.go that's why tests are excluded. I'm not sure there's a way to ignore doc for a public function. But your tasks shouldn't be compiled into the final binary

from gotask.

owenthereal avatar owenthereal commented on June 10, 2024

@kless I've implemented build tag in gotask (1dc2304) which will exclude tasks in application build. Upgrade gotask and try putting the build tag on top of your task file:

// +build gotask

package main
...

Note that there's an empty line before package definition. Let me know if it doesn't work

from gotask.

tredoe avatar tredoe commented on June 10, 2024

It works. Thanks!

from gotask.

Related Issues (12)

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.