objects

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer interface {
	Accept(arg interface{})
}

type Optional

type Optional struct {
	// contains filtered or unexported fields
}

Optional 可选结构

func OptionalOf

func OptionalOf(val interface{}) *Optional

OptionalOf 构造Optional

func OptionalOfNil

func OptionalOfNil() *Optional

OptionalOfNil 设置nil Optinal

func (*Optional) IfPresent

func (optinal *Optional) IfPresent(action *Consumer)

IfPresent 不支持泛型 暂不实现

func (*Optional) IsPresent

func (optinal *Optional) IsPresent() bool

IsPresent Optional值是否nil

func (*Optional) Of

func (optinal *Optional) Of() interface{}

Get 获取Optinal值

Jump to

Keyboard shortcuts

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