Permalink
Browse files

Fixed ugly tabs

  • Loading branch information...
1 parent 01ffa43 commit 99bf39bc85abddebe09092ed027f1068ffa5f54f @ahbishop committed May 3, 2013
Showing with 17 additions and 17 deletions.
  1. +17 −17 really_basic.go
View
@@ -1,13 +1,13 @@
package main
import (
- "fmt"
- "os"
- "strings"
+ "fmt"
+ "os"
+ "strings"
"time"
)
-func a_function(data []float32, comm_link chan float32){
+func a_function(data []float32, comm_link chan float32) {
result := float32(0)
for _, val := range data {
result += val
@@ -16,13 +16,13 @@ func a_function(data []float32, comm_link chan float32){
comm_link <- result
}
-func thingy(derp,quit chan int){
- x, y:=0,1
- for{
- select{
+func thingy(derp, quit chan int) {
+ x, y := 0, 1
+ for {
+ select {
case derp <- x:
x, y = y, x+y
- case <- quit:
+ case <-quit:
fmt.Println("Die bitch")
return
}
@@ -31,26 +31,26 @@ func thingy(derp,quit chan int){
}
func main() {
- da_var := "Sup sup"
- if len(os.Args) > 1 {
- da_var = strings.Join(os.Args[1:], " ")
- }
- fmt.Println("I can haz: ", da_var)
+ da_var := "Sup sup"
+ if len(os.Args) > 1 {
+ da_var = strings.Join(os.Args[1:], " ")
+ }
+ fmt.Println("I can haz: ", da_var)
data := []float32{3.14, 5.3, 13, 50.32, 10.13, 1513.123132143, 531234.1231}
c := make(chan float32)
go a_function(data, c)
- result := <- c
+ result := <-c
fmt.Println(result)
derp := make(chan int)
quit := make(chan int)
go func() {
- for i:=0; i<10; i++ {
+ for i := 0; i < 10; i++ {
fmt.Println(<-derp)
}
- quit <-0
+ quit <- 0
}()
thingy(derp, quit)
}

0 comments on commit 99bf39b

Please sign in to comment.