]> Cypherpunks repositories - gostls13.git/commitdiff
net: add the missing OS Darwin in the comment of sendFile
authorAndy Pan <panjf2000@gmail.com>
Fri, 26 Aug 2022 18:51:11 +0000 (02:51 +0800)
committerGopher Robot <gobot@golang.org>
Mon, 29 Aug 2022 20:04:53 +0000 (20:04 +0000)
Change-Id: Ice7e3762d4a1d71e23d619be699697f5c6523cc5
Reviewed-on: https://go-review.googlesource.com/c/go/+/425879
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/net/sendfile_unix_alt.go

index f99af92bc80b6211747ddc92e75859340380f724..b86771721ee2d704f1db4f652688a99c56902b4d 100644 (file)
@@ -20,7 +20,7 @@ import (
 //
 // if handled == false, sendFile performed no work.
 func sendFile(c *netFD, r io.Reader) (written int64, err error, handled bool) {
-       // FreeBSD, DragonFly and Solaris use 0 as the "until EOF" value.
+       // Darwin, FreeBSD, DragonFly and Solaris use 0 as the "until EOF" value.
        // If you pass in more bytes than the file contains, it will
        // loop back to the beginning ad nauseam until it's sent
        // exactly the number of bytes told to. As such, we need to
@@ -48,7 +48,7 @@ func sendFile(c *netFD, r io.Reader) (written int64, err error, handled bool) {
                remain = fi.Size()
        }
 
-       // The other quirk with FreeBSD/DragonFly/Solaris's sendfile
+       // The other quirk with Darwin/FreeBSD/DragonFly/Solaris's sendfile
        // implementation is that it doesn't use the current position
        // of the file -- if you pass it offset 0, it starts from
        // offset 0. There's no way to tell it "start from current