Files
threshold/internal/observability/event/id.go
T

17 lines
266 B
Go

package event
import (
"fmt"
"github.com/hashicorp/boundary/internal/db"
)
func newId(prefix string) (string, error) {
const op = "event.newId"
id, err := db.NewPublicId(prefix)
if err != nil {
return "", fmt.Errorf("%s: %w", op, err)
}
return id, nil
}