fix: fix typos

pull/177/head
httpcheck 2021-04-09 18:58:34 +08:00 committed by kun
parent cb5069aea2
commit 258f7b0440
1 changed files with 5 additions and 5 deletions

10
main.go
View File

@ -183,7 +183,7 @@ func (l *logger) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// An ops is a proxy.ServerOps implementation. // An ops is a proxy.ServerOps implementation.
type ops struct{} type ops struct{}
// NewContext crates a context. // NewContext creates a context.
func (*ops) NewContext(r *http.Request) (context.Context, error) { func (*ops) NewContext(r *http.Request) (context.Context, error) {
return context.Background(), nil return context.Background(), nil
} }
@ -224,7 +224,7 @@ func (*ops) List(ctx context.Context, mpath string) (proxy.File, error) {
return os.Open(file) return os.Open(file)
} }
// Latest fetch latest file. // Latest fetches latest file.
func (*ops) Latest(ctx context.Context, path string) (proxy.File, error) { func (*ops) Latest(ctx context.Context, path string) (proxy.File, error) {
d, err := download(module.Version{Path: path, Version: "latest"}) d, err := download(module.Version{Path: path, Version: "latest"})
if err != nil { if err != nil {
@ -233,7 +233,7 @@ func (*ops) Latest(ctx context.Context, path string) (proxy.File, error) {
return os.Open(d.Info) return os.Open(d.Info)
} }
// Info fetch info file. // Info fetches info file.
func (*ops) Info(ctx context.Context, m module.Version) (proxy.File, error) { func (*ops) Info(ctx context.Context, m module.Version) (proxy.File, error) {
d, err := download(m) d, err := download(m)
if err != nil { if err != nil {
@ -242,7 +242,7 @@ func (*ops) Info(ctx context.Context, m module.Version) (proxy.File, error) {
return os.Open(d.Info) return os.Open(d.Info)
} }
// GoMod fetch go mod file. // GoMod fetches go mod file.
func (*ops) GoMod(ctx context.Context, m module.Version) (proxy.File, error) { func (*ops) GoMod(ctx context.Context, m module.Version) (proxy.File, error) {
d, err := download(m) d, err := download(m)
if err != nil { if err != nil {
@ -251,7 +251,7 @@ func (*ops) GoMod(ctx context.Context, m module.Version) (proxy.File, error) {
return os.Open(d.GoMod) return os.Open(d.GoMod)
} }
// Zip fetch zip file. // Zip fetches zip file.
func (*ops) Zip(ctx context.Context, m module.Version) (proxy.File, error) { func (*ops) Zip(ctx context.Context, m module.Version) (proxy.File, error) {
d, err := download(m) d, err := download(m)
if err != nil { if err != nil {