github/file-seek/main.go 
<https://github.com/susarlanikhilesh/file-seek-failure/blob/main/main.go>

I did write with ReadOnly also and it failed. 

Sorry, I assumed both Append and ReadOnly fails.

On Tuesday 9 April 2024 at 02:14:48 UTC+5:30 Ian Lance Taylor wrote:

> On Mon, Apr 8, 2024, 3:33 PM Nikhilesh Susarla <nikhil...@gmail.com> 
> wrote:
>
>> I wanted to seek around a file by opening it using read-only, but then I 
>> get this error called "Invalid argument"
>>
>> https://go-review.googlesource.com/c/go/+/14881
>>
>> I read the above link and they say it is not supported to seek around. I 
>> tried direct lseek in c language and it failed with same. 
>>
>> Is there any way ?
>>
>
> What that link says is that if you open the file with O_APPEND then you 
> can't Seek.  Are you opening with O_APPEND?
>
> If not you will need to provide more information, such as a small program 
> that demonstrates the problem.
>
> Ian
>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/536e18e8-4dd3-44a4-8893-d5fa22836996n%40googlegroups.com.

Reply via email to