Some checks failed
ci/woodpecker/push/build Pipeline failed
- Add build tag to studio/embed.go to exclude from test builds - Create stub embed_testing.go for test builds - Update CI pipeline to use -tags testing - Add tests for webhook signature verification and status normalization Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
22 lines
323 B
Go
22 lines
323 B
Go
//go:build !testing
|
|
|
|
package studio
|
|
|
|
import (
|
|
"embed"
|
|
"io/fs"
|
|
"net/http"
|
|
"path"
|
|
)
|
|
|
|
//go:embed dist/*
|
|
var distFS embed.FS
|
|
|
|
func Handler() http.Handler {
|
|
sub, _ := fs.Sub(distFS, "dist")
|
|
return http.FileServer(http.FS(sub))
|
|
}
|
|
|
|
func Read(name string) ([]byte, error) {
|
|
return distFS.ReadFile(path.Join("dist", name))
|
|
}
|