landing scribbles, literate programming spike
This commit is contained in:
parent
665dfed884
commit
7b8b5d4324
13
README
13
README
@ -1,10 +1,4 @@
|
|||||||
= next
|
= next
|
||||||
get web presence in good enough shape to point to from blog post
|
|
||||||
gbe-web
|
|
||||||
basic design / brand
|
|
||||||
basic copy
|
|
||||||
sign up form
|
|
||||||
|
|
||||||
blog post on Go on Heroku
|
blog post on Go on Heroku
|
||||||
write
|
write
|
||||||
review with Keith
|
review with Keith
|
||||||
@ -14,10 +8,17 @@ blog post on Postgres
|
|||||||
review with Keith
|
review with Keith
|
||||||
ship & market
|
ship & market
|
||||||
|
|
||||||
|
get web presence in good enough shape to point to from blog post
|
||||||
|
gbe-web
|
||||||
|
basic design / brand
|
||||||
|
basic copy - landing, post-subscribe, post-confirm
|
||||||
|
subscription management
|
||||||
|
|
||||||
validate book style in editor
|
validate book style in editor
|
||||||
|
|
||||||
validate book style in web mockup
|
validate book style in web mockup
|
||||||
|
|
||||||
|
join Google+ and claim website
|
||||||
|
|
||||||
= vision
|
= vision
|
||||||
must-have book for hackers interested in Go
|
must-have book for hackers interested in Go
|
||||||
|
@ -1,17 +1,21 @@
|
|||||||
|
// Varadic functions can be called with any number of
|
||||||
|
// trailing arguments.
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
func add(nums ...int) int {
|
func add(nums ...int) int { // Varadic args are declared with `...type` and passed in as
|
||||||
total := 0
|
for _, num := range nums { // a slice.
|
||||||
for _, num := range nums {
|
|
||||||
total += num
|
total += num
|
||||||
}
|
}
|
||||||
return total
|
return total
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
fmt.Println(add(1, 2)) // Varadic functions can be called in the usual way.
|
||||||
fmt.Println(add(1, 2, 3, 4))
|
fmt.Println(add(1, 2, 3, 4))
|
||||||
nums := []int{1, 2, 3, 4, 5}
|
|
||||||
fmt.Println(add(nums...))
|
nums := []int{2, 3, 4, 5} // If you already have multiple args in a `slice`, apply
|
||||||
|
fmt.Println1(add(1, nums...)) // them to a varadic function using `func(arg, slice...)`.
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,23 @@
|
|||||||
<Go by Example>
|
<Go by Example>
|
||||||
|
|
||||||
|
|
||||||
+--------------+
|
|
||||||
| |
|
|
||||||
| | Your practical guide to Go.
|
+---------------------------------------------------------------+
|
||||||
| Go |
|
|
||||||
| by | Sign up to hear when it's ready:
|
|
||||||
| Example | [ (Your Email) ] {Go}
|
|
||||||
| |
|
| |
|
||||||
| |
|
| |
|
||||||
| |
|
| |
|
||||||
+--------------+
|
| +--------------+ |
|
||||||
|
| | | |
|
||||||
|
| | | Your practical guide to Go. |
|
||||||
|
| | Go | |
|
||||||
|
| | by | Get updates about the book: |
|
||||||
|
| | Example | [ (Your Email) ] {Subscribe} |
|
||||||
|
| | | |
|
||||||
|
| | | |
|
||||||
|
| | | |
|
||||||
|
| +--------------+ |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
| |
|
||||||
|
+---------------------------------------------------------------+ +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user