Go - How to read/write to file?
Posted
by Seth Hoenig
on Stack Overflow
See other posts from Stack Overflow
or by Seth Hoenig
Published on 2009-11-30T19:17:46Z
Indexed on
2010/04/11
18:13 UTC
Read the original article
Hit count: 477
I've been trying to learn Go / Golang on my own, but I've been stumped on trying read and write to ordinary files.
I can get as far as: inFile,_ := os.Open(INFILE,0,0);
but actually getting the content of the file doesn't make sense, since the read function takes a []byte
as a parameter??
func (file *File) Read(b []byte) (n int, err Error)
© Stack Overflow or respective owner