Thanks to all the replies, but looks like I got the answer from another forum [1]. Copying here:
The Close() method was originally used to tear down the background groutine used by the deflater. The background goroutine was removed in in a June, 2011 change list [2]. The author of the CL wrote the following in a comment on the CL [3]: > Close used to tear down the goroutine associated with the reader, but now > there isn't one. Probably Close will go away entirely, but that's a separate > CL. They never got around to removing the Close() method before the compatibility guarantee [4] was introduced in the Go 1 release. 1. https://stackoverflow.com/a/68075823 2. https://github.com/golang/go/commit/07acc02a29ac74e7c0b 3. https://codereview.appspot.com/4548079#msg3 4. https://golang.org/doc/go1compat -- 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/CAP8dQmtYdnCbqDn6-rh6o5hGVtTdb2z2Nq8XK33LCgYHATBkWg%40mail.gmail.com.