utils

package
v0.0.0-...-9fcf8e2 Latest Latest
Warning

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

Go to latest
Published: May 1, 2022 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Всякое разное

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ptr

func Ptr[T any](t T) *T

Ptr получение указателя от произвольного значения, например, ToPtr(true) -> *bool(true)

Types

type Scalar

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

Scalar соответствует скалярам над которыми определены операции сравнения

type Sortable

type Sortable[T any] interface {
	Less(T) bool
}

Sortable соответствует типам над которыми определена операция Less

Source Files

  • constraints.go
  • doc.go
  • ptr.go

Jump to

Keyboard shortcuts

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