some manual renames

This commit is contained in:
Mark McGranaghan 2012-09-23 14:30:42 -07:00
parent 0d0a210ef4
commit d1e82077ac
17 changed files with 27 additions and 53 deletions

View File

@ -1,27 +0,0 @@
// ## Burstable Rate Limiting
package main
import "time"
import "fmt"
func main() {
tick := time.Tick(time.Millisecond * 200)
throttle := make(chan bool, 10)
go func() {
for {
<- tick
select {
case throttle <- true:
default:
}
}
}()
time.Sleep(time.Millisecond * 1000)
for {
<- throttle
go fmt.Println("acting")
}
}
// todo: credit http://code.google.com/p/go-wiki/wiki/RateLimiting

View File

@ -1,4 +1,4 @@
// ## Worker Pool // ## Worker Pools
package main package main

View File

@ -1,5 +0,0 @@
$ go run sort.go
[a b c]
[2 4 7]
true
1

View File

@ -1,4 +1,4 @@
// ## Sort // ## Sorting
// The `sort` package implements sorting for builtins // The `sort` package implements sorting for builtins
// and user-defined types. We'll look at some of the // and user-defined types. We'll look at some of the

5
046-sorting/sorting.sh Normal file
View File

@ -0,0 +1,5 @@
$ go run sorting.go
[a b c]
[2 4 7]
true
1

View File

@ -1,4 +1,4 @@
// ## Sort by Function // ## Sorting by Functions
package main package main

View File

@ -1,4 +1,4 @@
$ go run sort-by-function.go $ go run sorting-by-function.go
Original: [{Jack 10} {Jill 9} {Bob 12}] Original: [{Jack 10} {Jill 9} {Bob 12}]
ByName: [{Bob 12} {Jack 10} {Jill 9}] ByName: [{Bob 12} {Jack 10} {Jill 9}]
ByAge: [{Jill 9} {Jack 10} {Bob 12}] ByAge: [{Jill 9} {Jack 10} {Bob 12}]

View File

@ -1,4 +1,4 @@
// ## Epoch // ## Epochs
package main package main

View File

@ -1,4 +1,4 @@
$ go run 051-epoch.go $ go run epochs.go
Secs: 1348240948 Secs: 1348240948
Millis: 1348240948517 Millis: 1348240948517
Nanos: 1348240948517870000 Nanos: 1348240948517870000

View File

@ -1,4 +1,4 @@
// ## Elapsed Time // ## Measuring Elapsed Time
package main package main

View File

@ -1,4 +1,4 @@
// Rand // Random Numbers
package main package main

View File

@ -1,4 +1,4 @@
$ go run rand.go $ go run random-numbers.go
81,87 81,87
0.6645600532184904 0.6645600532184904
5,87 5,87

View File

@ -1,4 +1,4 @@
// ## Enumerable // ## Collection Functions
package main package main
@ -91,3 +91,5 @@ func main() {
})) }))
fmt.Println() fmt.Println()
} }
// todo: generics

View File

@ -40,23 +40,22 @@ errors
# concurrency # concurrency
goroutines goroutines
concurrency concurrent-goroutines
channels channels
buffering channel-buffering
directions channel-directions
synchronization synchronization
select select
timeouts timeouts
scatter-gather scatter-gather
rate-limiting rate-limiting
burstable-rate-limiting worker-pools
worker-pool
~ nonblocking-sends-and-receives ~ nonblocking-sends-and-receives
~ closing-channels ~ closing-channels
# core libraries # core libraries
sort sorting
sort-by-function sorting-by-functions
string-functions string-functions
string-formatting string-formatting
regexs regexs
@ -65,13 +64,13 @@ json
~ typed-json ~ typed-json
time time
~ time-formatting ~ time-formatting
epoch epochs
elapsed measuring-elapsed-time
timers timers
tickers tickers
rand random-numbers
number-parsing number-parsing
enumerable collection-functions
urls urls
sha1-hashes sha1-hashes
~ base64-encoding ~ base64-encoding