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
+4k Google : Block or disable caching of your website content
+7.5k Android Studio : Image button and button example
+15.4k Golang : Send email and SMTP configuration example
+18.1k Golang : How to get own program name during runtime ?
+18.3k Golang : How to Set or Add Header http.ResponseWriter?
+8k Golang : Generate EAN barcode
+12.7k Golang : How to determine if a year is leap year?
+5.7k Golang : Gargish-English language translator
+12.8k Golang : convert rune to unicode hexadecimal value and back to rune character
+12.5k Golang : Query string with space symbol %20 in between
+3.6k Golang : Valued expressions and functions example
+6.9k Golang : Check from web if Go application is running or not