defaults

package
v0.0.0-...-8d8ec1c Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package defaults - Golang Structure에 Defaults 값 설정 기능 제공 패키지

Package defaults -

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyDefaultValues

func ApplyDefaultValues(ptr interface{}) error

ApplyDefaultValues - Pointer로 참조되는 Structure의 Field들에 대한 초기값을 설정한다.

func CanUpdate

func CanUpdate(v interface{}) bool

CanUpdate - 지정한 값을 초기값으로 설정할 수있는지 여부 검증

Types

type Setter

type Setter interface {
	SetDefaults()
}

Setter - Struct에 기본 값 설정이 가능하도록 메서드를 제공하는 인터페이스

Jump to

Keyboard shortcuts

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