f, err := os.Open(filename) //read only
f, err := os.OpenFile(filename, os.O_WRONLY|os.O_APPEND|os.O_CREAE, 0666) //append
os.O_RDONLY : read only
os.O_WRONLY: write only
os.O_RDWR: read and write
os.O_APPEND: write with append
os.O_CREAT: create new file if not exists