Skip to content

Commit

Permalink
fixed more typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario Gutierrez committed Feb 5, 2015
1 parent c6ed2c9 commit 668ed4f
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ func Tasks(p *Project) {

p.Task("hello", func(c *Context) {
name := c.Args.ZeroString("name", "n")

if name == "" {
Bash("echo Hello $USER!")
} else {
Expand Down Expand Up @@ -78,7 +77,7 @@ p.Task("build?", func() {})
Task options

D{} or Dependencies{} - dependent tasks which run before task
Debounce - minimum milliseconds before task can run again
Debounce() - minimum milliseconds before task can run again
W{} or Watches{} - array of glob file patterns to watch

/**/ - match zero or more directories
Expand All @@ -105,7 +104,7 @@ As an example,

```go
p.Task("hello", func(c *Context) {
# "(none)" is the default value
// "(none)" is the default value
name := c.Args.MayString("(none)", "name", "n")
fmt.Println("Hello", name)
})
Expand All @@ -124,24 +123,24 @@ godo hello -- -n dude

Args functions are categorized as

* `Must*` - Argument must be set by user
* `Must*` - Argument must be set by user or panic.

```go
c.Args.MustInt("number", "n")
```

* `May*` - If argument is not set, default to first value in function call
* `May*` - If argument is not set, default to first value.

```go
// defaults to 100
c.Args.MayInt(100, "number", "n")
```

* `Zero*` - If argument is not set, default to zero value
* `Zero*` - If argument is not set, default to zero value.

```go
// defaults to 0
c.Args.ZeroInt(100, "number", "n")
c.Args.ZeroInt("number", "n")
```

## Exec functions
Expand Down Expand Up @@ -243,4 +242,3 @@ The effective environment for exec functions is: `parent (if inherited) <- Env <

Paths should use `::` as a cross-platform path list separator. On Windows `::` is replaced with `;`.
On Mac and linux `::` is replaced with `:`.

0 comments on commit 668ed4f

Please sign in to comment.