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
+10.2k Golang : Intercept and process UNIX signals example
+7.3k Golang : HttpRouter multiplexer routing example
+10.6k Golang : How to flush a channel before the end of program?
+11k Golang : Determine if time variables have same calendar day
+5.9k Golang : Gargish-English language translator
+16.1k Golang : XML to JSON example
+4.3k Golang : Convert lines of string into list for delete and insert operation
+22.4k Golang : Print out struct values in string format
+7.1k Golang : Load DSA public key from file example
+7.1k Golang : How to feed or take banana with Gorilla Web Toolkit Session package
+6.4k Golang : Mapping Iban to Dunging alphabets
+11.2k Golang : Print UTF-8 fonts on image example