owenthereal / gotask Goto Github PK
View Code? Open in Web Editor NEWIdiomatic build tool in Go
Home Page: https://github.com/jingweno/gotask
License: MIT License
Idiomatic build tool in Go
Home Page: https://github.com/jingweno/gotask
License: MIT License
When it is used a task into a package, the functions exported (like "TaskSomething") of that file are compiled too in the package.
Any way to solve it without to add the task files into a sub-directory?
Related to https://groups.google.com/forum/#!topic/golang-nuts/e8uA_iYHGhs
I think that gotask is getting very heavy with so many external dependencies.
Please, keep it light because I find a penalty performance at running a command from gotask vs "go test".
I copied the sayhello_task.go from this page [1]
OSX 10.10,
go installed using brew
here is the result
$ cat sayhello_task.go
package main
import (
"github.com/jingweno/gotask/tasking"
"os/user"
"time"
)
// NAME
// say-hello - Say hello to current user
//
// DESCRIPTION
// Print out hello to current user
//
// OPTIONS
// --verbose, -v
// run in verbose mode
func TaskSayHello(t *tasking.T) {
user, _ := user.Current()
if t.Flags.Bool("v") || t.Flags.Bool("verbose") {
t.Logf("Hello %s, the time now is %s\n", user.Name, time.Now())
} else {
t.Logf("Hello %s\n", user.Name)
}
}
pc-etienne:PhotoProcessor ec$ gotask say-hello
can't load package: /private/var/folders/c7/97_ghhl11x7fwsq2nc5908v8000lj8/T/go-task386440535/main.go:8:3: import "." is a program, not an importable package
/private/var/folders/c7/97_ghhl11x7fwsq2nc5908v8000lj8/T/go-task386440535/main.go:8:3: import "." is a program, not an importable package
2015/09/23 23:38:30 exit status 1
c-etienne:PhotoProcessor ec$ go version
go version go1.5.1 darwin/amd64
pc-etienne:PhotoProcessor ec$
[1] http://owenou.com/2013/11/27/writing-build-tasks-in-go-with-gotask.html
$ gotask
say-hello
subfolder1
say-hello
subfolder2
say-hello
It would be nice to make Exec helper function optionally verbose in order to output the executed command.
Hello,
when I attempt to run example from readme file I received following messages:
./bin/gotask say-hello
can't load package: import cycle not allowed
package .
imports .
import cycle not allowed
package .
imports .
I'm using GO version 1.4
Running gotask -c
and execute the binary, for example for the examples tasks:
NAME:
examples - A new cli application
USAGE:
examples [global options] command [command options] [arguments...]
VERSION:
0.0.0
COMMANDS:
gh-user Get URL for a given GitHub user login
say-hello Say hello to current user
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--version print the version
--help, -h show help
The description is not filled.
Currently only bool
type is supported. Add support for string
as well. Reference: http://godoc.org/github.com/jingweno/gotask/tasking#Flags
It would be nice to encapsulate more information in tasking.T struct such as:
$ gotask say-hello
is alias to
$ gotask sh
We need to prevent people from doing the wrong thing
"gotask -c" compiles to 'package_name.task' but it would be better if were used the file name since that you could have several task files in the same directory.
e.g. for a file name 'testdata_task.go', the task binary would be 'testdata.task'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.