func readFileContent(fileName string) string { file, err := os.Open(filename) if err != nil { return "" } content, err := ioutil.ReadAll(file) if err != nil { return "" } file.Close() return content }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter