Help us shape the future of Go! Take the 2026 Go Developer Survey

utils

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Float32ToFloat64

func Float32ToFloat64(src []float32) []float64

func GetULID

func GetULID() string

func StringToVector

func StringToVector(vectorStr string) ([]float32, error)

StringToVector 将PostgreSQL向量字符串转换为float32向量

func ValueToPtr

func ValueToPtr[T ToPtr](f T) *T

func Vector64ToString

func Vector64ToString(vector []float64) string

func VectorToString

func VectorToString(vector []float32) string

VectorToString 将float32向量转换为PostgreSQL向量字符串格式

Types

type ToPtr

type ToPtr interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64 |
		~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 |
		~uintptr |
		~float32 | ~float64 |
		~string |
		~bool
}

Jump to

Keyboard shortcuts

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