Skip to content

Expose FileFS #2814

@pcfreak30

Description

@pcfreak30

I have hit a situation where I want to re-use FileFS manually in my own abstractions which wraps fsFile but its not in the interface and is only allowed via echo.FileFS.

	if indexFile == "" {
		indexFile = DefaultIndexFile
	}

	echoRouter.GET("/*", func(c echo.Context) error {
		if strings.HasPrefix(c.Request().URL.Path, "/api/") {
			return echo.ErrNotFound
		}
		return c.FileFS(indexFile,fsys )
	})
	return nil
}

I want return c.FileFS(indexFile ,fsys ) but im having to copy your fsFile into my library...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions