utils

package
v1.5.0-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBSafeUTF8StringFromPtr

func DBSafeUTF8StringFromPtr(ctx context.Context, s *string) string

DBSafeUTF8StringFromPtr returns a DB-safe UTF-8 string from a pointer. Nil pointers return "". Strings containing invalid UTF-8 sequences or null bytes (which PostgreSQL rejects in text columns even though null bytes are technically valid UTF-8) are hex-encoded instead, with a warning logged.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL