ax(mining): replace prose comment with usage example on GetComponentFS
AX Principle 2: comments show HOW with real values, not WHAT the signature already says. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
985fc78c40
commit
a433b37de1
1 changed files with 3 additions and 2 deletions
|
|
@ -9,8 +9,9 @@ import (
|
|||
//go:embed component/*
|
||||
var componentFS embed.FS
|
||||
|
||||
// GetComponentFS returns the embedded file system containing the web component.
|
||||
// This allows the component to be served even when the package is used as a module.
|
||||
// fs, err := mining.GetComponentFS()
|
||||
// if err != nil { return err }
|
||||
// router.StaticFS("/component", fs)
|
||||
func GetComponentFS() (http.FileSystem, error) {
|
||||
sub, err := fs.Sub(componentFS, "component")
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue