Skip to content
Permalink
83e0d7979c
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
28 lines (23 sloc) 429 Bytes
package main
import (
"bufio"
"fmt"
"os"
"strings"
)
func main() {
// Open the file and scan it.
f, _ := os.Open("/etc/local/mxnet")
scanner := bufio.NewScanner(f)
for scanner.Scan() {
line := scanner.Text()
// Split the line on commas.
parts := strings.Split(line, " ")
// Loop over the parts from the string.
for i := range parts {
fmt.Println(parts[i])
}
// Write a newline.
fmt.Println()
}
}