Reading a file line by line in Go

In Go 1.1 and newer the most simple way to do this is with a bufio.Scanner. Here is a simple example that reads lines from a file: package main import ( “bufio” “fmt” “log” “os” ) func main() { file, err := os.Open(“/path/to/file.txt”) if err != nil { log.Fatal(err) } defer file.Close() scanner := bufio.NewScanner(file) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)