Skip to content
Myr

fs.go

This file

Path

internal/fs/fs.go

21 lines · 362 bytes · Go

Last changed by

ci(golangci-lint): update configuration and fix lint issues (#4247)Flc゛before adoptionc4287b1

History of this file

Take it

1package fs23import (4	"io/fs"5	"net/http"6)78// FileSystem implements an [fs.FS].9type FileSystem struct {10	http.FileSystem11}1213// Open passes `Open` to the upstream implementation and return an [fs.File].14func (o FileSystem) Open(name string) (fs.File, error) {15	f, err := o.FileSystem.Open(name)16	if err != nil {17		return nil, err18	}1920	return fs.File(f), nil21}