Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
os.Open() は O_RDONLY ファイルを返し、os.Create() は O_RDWR を返しますが、APPEND ファイル ポインターを返すメソッドが見つかりません。
助けはありますか?
OpenFileは、使用できる flags 引数を取ります。
os.OpenFile("foo.txt", os.O_RDWR|os.O_APPEND, 0660);
O_CREATE とともに使用すると、OpenFile は os.Create() と同じ目的にも使用できます。