Golang io/ioutil.ReadFile() function example
package io/ioutil
Golang io/ioutil.ReadFile() function usage example
package main
import (
"fmt"
"io/ioutil"
)
func main() {
content, _ := ioutil.ReadFile("utf8.txt")
fmt.Printf("%s", content)
}
Reference :
Advertisement
Something interesting
Tutorials
+7.6k Golang : Set horizontal, vertical scroll bars policies and disable interaction on Qt image
+33k Golang : How to check if a date is within certain range?
+16.4k Golang : How to implement two-factor authentication?
+17.9k Golang : How to make a file read only and set it to writable again?
+31.5k Golang : bufio.NewReader.ReadLine to read file line by line
+30.8k Golang : Download file example
+19.5k Golang : Example for DSA(Digital Signature Algorithm) package functions
+7.2k Golang : Check if one string(rune) is permutation of another string(rune)
+14.8k Golang : Adding XML attributes to xml data or use attribute to differentiate a common tag name
+7.9k Golang : Ways to recover memory during run time.
+4.8k Golang : A program that contain another program and executes it during run-time
+8.4k Golang : Convert word to its plural form example