Skip to content

Commit

Permalink
Fixed ugly tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
ahbishop committed May 3, 2013
1 parent 01ffa43 commit 99bf39b
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions really_basic.go
@@ -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
Expand All @@ -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
}
Expand All @@ -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.