Documentation ¶
Index ¶
- func BytesToStringUnsafe(b []byte) string
- func Compare[T comparable](old, new []T) ([]T, []T)
- func FakeSOA(name string) *dns.SOA
- func IsContextCancelled(ctx context.Context) bool
- func Join[T fmt.Stringer](arr []T, seq string) string
- func JsonDecode(in any, out any) error
- func RandomAddrFromPrefix(prefix netip.Prefix) netip.Addr
- func RandomIDUint16() uint16
- type ChiRouterBuilder
- type ChiRouterBuilderItem
- type Duration
- type GraphNode
- func (n *GraphNode[T]) AddNext(node *GraphNode[T])
- func (n *GraphNode[T]) AddPrev(node *GraphNode[T])
- func (n *GraphNode[T]) Data() T
- func (n *GraphNode[T]) HasNext() bool
- func (n *GraphNode[T]) HasPrev() bool
- func (n *GraphNode[T]) Next() []*GraphNode[T]
- func (n *GraphNode[T]) NextMap() map[T]*GraphNode[T]
- func (n *GraphNode[T]) Prev() []*GraphNode[T]
- func (n *GraphNode[T]) PrevMap() map[T]*GraphNode[T]
- func (n *GraphNode[T]) RemoveNext(node *GraphNode[T])
- func (n *GraphNode[T]) RemovePrev(node *GraphNode[T])
- type Limiter
- type Listable
- type Queue
- type Result
- type SafeChan
- type Stack
- type Task
- type TaskGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToStringUnsafe ¶
from mosdns(https://github.com/IrineSistiana/mosdns), thank for @IrineSistiana BytesToStringUnsafe converts bytes to string.
func Compare ¶
func Compare[T comparable](old, new []T) ([]T, []T)
func FakeSOA ¶
from mosdns(https://github.com/IrineSistiana/mosdns), thank for @IrineSistiana
func IsContextCancelled ¶
func JsonDecode ¶
func RandomIDUint16 ¶
func RandomIDUint16() uint16
Types ¶
type ChiRouterBuilder ¶
type ChiRouterBuilder struct {
// contains filtered or unexported fields
}
func NewChiRouterBuilder ¶
func NewChiRouterBuilder() *ChiRouterBuilder
func (*ChiRouterBuilder) Add ¶
func (c *ChiRouterBuilder) Add(item *ChiRouterBuilderItem)
func (*ChiRouterBuilder) Build ¶
func (c *ChiRouterBuilder) Build() chi.Router
type ChiRouterBuilderItem ¶
type Duration ¶
func (Duration) MarshalJSON ¶
func (Duration) MarshalYAML ¶
func (*Duration) UnmarshalJSON ¶
func (*Duration) UnmarshalYAML ¶
type GraphNode ¶
type GraphNode[T comparable] struct { // contains filtered or unexported fields }
func NewGraphNode ¶
func NewGraphNode[T comparable](data T) *GraphNode[T]
func (*GraphNode[T]) RemoveNext ¶
func (*GraphNode[T]) RemovePrev ¶
type Listable ¶
type Listable[T any] []T
func (*Listable[T]) MarshalJSON ¶
func (*Listable[T]) MarshalYAML ¶
func (*Listable[T]) UnmarshalJSON ¶
func (*Listable[T]) UnmarshalYAML ¶
type SafeChan ¶
type SafeChan[T any] struct { // contains filtered or unexported fields }
func NewSafeChan ¶
func (*SafeChan[T]) ReceiveChan ¶
func (c *SafeChan[T]) ReceiveChan() <-chan T
type TaskGroup ¶
type TaskGroup struct {
// contains filtered or unexported fields
}
func NewTaskGroup ¶
func NewTaskGroup() *TaskGroup
func NewTaskGroupWithContext ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.