Registry / utility / google-safetext

google-safetext

JSON →
library0.0.0-20260330151545-1fb717a317c5gogounverified

Package safetext provides safe text formatting functions to prevent injection attacks.

go get github.com/google/safetext
INSTALL
IMPORT
SIG · GOOGLE-SAFETEXT
G
google-safetext
utilitygov0.0.0-20260330151545-1fb717a317c5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

safetext
github.com/google/safetext

Format strings safely to prevent injection

package main import ( "fmt" "github.com/google/safetext" ) func main() { safe := safetext.Sprintf("Hello %s", "<script>alert('xss')</script>") fmt.Println(safe) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20260330151545-1fb717a317c5latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
google-safetext — go get google-safetext · libregistry