Golang : rune literal not terminated error
Encounter this error message rune literal not terminated
while working on a Golang project recently. Took me a while to spot the error and fix it. (Must be sign of old age)
Apparently, the '
symbol in front of the package name io/ioutil
import (
"fmt"
'io/ioutil" // <----- here
"encoding/csv"
"encoding/json"
)
will cause the Golang compiler to generate rune literal not terminated
error message.
To fix, this error... simply change '
to "
import (
"fmt"
"io/ioutil" // <--- see the diff ?
"encoding/csv"
"encoding/json"
)
Golang is still at its infancy stage by the time of writing this and hopefully the compiler will throw out more meaningful error message in future version.
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+7k Golang : Fibonacci number generator examples
+11.8k Golang : Concurrency and goroutine example
+16.6k Golang : Check if a string contains multiple sub-strings in []string?
+8.2k Golang : Tell color name with OpenCV example
+24.6k Golang : Time slice or date sort and reverse sort example
+29.5k Golang : JQuery AJAX post data to server and send data back to client example
+6.8k Golang : Derive cryptographic key from passwords with Argon2
+5.7k PHP : Convert CSV to JSON with YQL example
+21.3k Golang : Get password from console input without echo or masked
+7.3k Golang : Of hash table and hash map
+26k Golang : Daemonizing a simple web server process example
+9.7k Golang : Copy map(hash table) example