
Product
Introducing Supply Chain Attack Campaigns Tracking in the Socket Dashboard
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.
-- import "vimagination.zapto.org/pages"
const (
Static = "-static-"
StaticTemplate = "{{define \"title\"}}{{.Title}}{{end}}{{define \"style\"}}{{.Style}}{{end}}{{define \"body\"}}\n{{.Body}}{{end}}"
)
var (
ErrTemplateExists = errors.New("template already exists")
ErrUnknownTemplate = errors.New("unknown template")
)
Errors
type Bytes struct {
}
func (b *Bytes) ServeHTTP(w http.ResponseWriter, r *http.Request)
type File struct {
Filename string
LastModified time.Time
}
func (f *File) ServeHTTP(w http.ResponseWriter, r *http.Request)
type HookFn func(http.ResponseWriter, *http.Request, interface{}) interface{}
var PassthroughHook HookFn = func(_ http.ResponseWriter, _ *http.Request, data interface{}) interface{} {
return data
}
type Pages struct {
}
func New(baseTemplateFilename string) (*Pages, error)
func NewString(baseTemplate string) (*Pages, error)
func (p *Pages) Bytes(title, style string, body template.HTML) *Bytes
func (p *Pages) File(title, style, filename string) *File
func (p *Pages) Hook(hook HookFn)
func (p *Pages) Rebuild() error
func (p *Pages) RegisterFile(name, filename string) error
func (p *Pages) RegisterString(name, contents string) error
func (p *Pages) StaticFile(static string) error
func (p *Pages) StaticString(static string) error
func (p *Pages) Write(w http.ResponseWriter, r *http.Request, templateName string, data interface{}) error
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.

Research
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.

Security News
Node.js 25.4.0 makes require(esm) stable, formalizing CommonJS and ESM compatibility across supported Node versions.