mirror of
https://lab.forgefriends.org/friendlyforgeformat/gof3.git
synced 2025-10-06 08:02:46 +02:00
24 lines
494 B
Go
24 lines
494 B
Go
// Copyright Earl Warren <contact@earl-warren.org>
|
|
// Copyright Loïc Dachary <loic@dachary.org>
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package f3
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"lab.forgefriends.org/friendlyforgeformat/gof3/f3"
|
|
)
|
|
|
|
func NewUserPath[T any](id T) Path {
|
|
return NewPathFromString(NewUserPathString(id))
|
|
}
|
|
|
|
func NewUserPathString[T any](id T) string {
|
|
return fmt.Sprintf("/forge/users/%v", id)
|
|
}
|
|
|
|
func NewUserReference[T any](id T) *f3.Reference {
|
|
return f3.NewReference(NewUserPathString(id))
|
|
}
|