lpar / gzipped

Replacement for golang http.FileServer which supports precompressed static assets.
BSD 3-Clause "New" or "Revised" License
94 stars 15 forks source link

wrong package import in README for v2.0.0 #9

Closed hhromic closed 4 years ago

hhromic commented 4 years ago

Hi, the example in the current README file is not correct:

package main

import (
    "log"
    "net/http"

    "github.com/lpar/gzipped"
)

func main() {
    log.Fatal(http.ListenAndServe(":8080", http.StripPrefix("/css",
    gzipped.FileServer(gzipped.Dir("/var/www/assets/css")))))
}

This example requires the new gzipped.Dir() function introduced in v2.0.0, however the example is importing the older v1 version of the package. The import should be:

    "github.com/lpar/gzipped/v2"

If you don't have time let me know and I can send a PR fixing this for you. Thanks!