Created
May 5, 2016 20:06
-
-
Save vodrazka/600efa365ad34c31ae57887ca7c9df4e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
//ecs.Start(ecs.Configuration{FpsLimit: 30}, &MyScene{}) | |
// Load a TXT file. | |
f, _ := os.Open("a") | |
defer f.Close() | |
// Create a new reader. | |
r := csv.NewReader(bufio.NewReader(f)) | |
r.Comma = ';' | |
for { | |
record, err := r.Read() | |
// Stop at EOF. | |
if err == io.EOF { | |
break | |
} | |
// Display record. | |
// ... Display record lengthe | |
// ... Display all individual elements of the slice. | |
fmt.Println(record) | |
fmt.Println(len(record)) | |
for value := range record { | |
fmt.Printf(" %v\n", record[value]) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment