fast-replace/go-fast-replace/cmd/pairs/main.go

25 lines
368 B
Go

package main
import (
"fmt"
"log"
"os"
"internal/pairs"
)
func main() {
fmt.Println("Creating pairs...")
f, err := os.OpenFile("./csv/pairs.csv", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0755)
if err != nil {
log.Fatal(err)
}
defer f.Close()
lines := pairs.MakePairs()
// Write to file
for _, line := range lines {
f.WriteString(line + "\n")
}
}