
Security News
OpenClaw Skill Marketplace Emerges as Active Malware Vector
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.
proxy-git.cwkhome.fun/gowebly/helpers
Advanced tools
A most useful helpers for build the best Go web applications with Gowebly CLI.
💡 Note: You can use these helpers in other projects as well.
gowebly.GetenvHelper to get the given environment variable. If key is not found, sets a fallback value.
import (
gowebly "github.com/gowebly/helpers"
)
// Get a value of the environment variable 'BACKEND_PORT'
// or sets it to a fallback value '5000'.
gowebly.Getenv("BACKEND_PORT", "5000")
💡 Note: This is a more advanced version of the built-in os.Getenv function.
gowebly.ParseTemplatesHelper to parse list of the given templates to the HTTP handler.
import (
"log/slog"
gowebly "github.com/gowebly/helpers"
)
func handler(w http.ResponseWriter, r *http.Request) {
// Define paths to the user templates.
indexPage := filepath.Join("templates", "pages", "index.html")
indexLoginForm := filepath.Join("templates", "components", "index-login-form.html")
// Parse user templates, using gowebly helper, or return error.
tmpl, err := gowebly.ParseTemplates(indexPage, indexLoginForm)
if err != nil {
w.WriteHeader(http.StatusBadRequest)
slog.Error(err.Error(), "method", r.Method, "status", http.StatusBadRequest, "path", r.URL.Path)
return
}
// Execute (render) all templates or return error.
if err := tmpl.Execute(w, nil); err != nil {
w.WriteHeader(http.StatusInternalServerError)
slog.Error(err.Error(), "method", r.Method, "status", http.StatusInternalServerError, "path", r.URL.Path)
return
}
}
💡 Note: The main layout template (
templates/main.html) is already included.
gowebly.ParseTemplatesWithCustomMainLayoutHelper to parse a list of the given templates with a custom main layout to the HTTP handler. Useful to use at times when you want to override file name of the default templates/main.html layout template.
import (
"log/slog"
gowebly "github.com/gowebly/helpers"
)
func handler(w http.ResponseWriter, r *http.Request) {
// Define path to the main layout template.
customMainLayout := filepath.Join("templates", "my-custom-main.html")
// Define paths to the user templates.
indexPage := filepath.Join("templates", "pages", "index.html")
indexLoginForm := filepath.Join("templates", "components", "index-login-form.html")
// Parse user templates or return error.
tmpl, err := gowebly.ParseTemplatesWithCustomMainLayout(customMainLayout, indexPage, indexLoginForm)
if err != nil {
w.WriteHeader(http.StatusBadRequest)
slog.Error(err.Error(), "method", r.Method, "status", http.StatusBadRequest, "path", r.URL.Path)
return
}
// Execute (render) all templates or return error.
if err := tmpl.Execute(w, nil); err != nil {
w.WriteHeader(http.StatusInternalServerError)
slog.Error(err.Error(), "method", r.Method, "status", http.StatusInternalServerError, "path", r.URL.Path)
return
}
}
gowebly.StaticFileServerHandlerHelpers to create a custom handler for serve embed ./static folder.
import (
"embed"
"net/http"
gowebly "github.com/gowebly/helpers"
)
//go:embed static/*
var static embed.FS
// Create the gowebly helper for serve embed static folder.
staticFileServer := gowebly.StaticFileServerHandler(http.FS(static))
// Handle static files (with a custom handler).
http.Handle("/static/", staticFileServer)
The Gowebly Helpers is free and open-source software licensed under the Apache 2.0 License, created and supported by Vic Shóstak with 🩵 for people and robots.
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.

Security News
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.