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

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
// 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

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}]
ByName: [{Bob 12} {Jack 10} {Jill 9}]
ByAge: [{Jill 9} {Jack 10} {Bob 12}]

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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