shortid

package
v0.0.0-...-a1c7e93 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package shortid 提供 shortHash 工具函数,截取 SHA-256 摘要的前 12 位用于日志显示。 避免在多个包中重复定义相同的 shortHash 函数。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShortHash

func ShortHash(h string) string

ShortHash 截取十六进制字符串的前 12 位用于日志显示。 若字符串长度不超过 12,直接返回原串。

Types

This section is empty.

Jump to

Keyboard shortcuts

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