webutil

webutil

import "github.com/yuta-yoshinaga/go_trumpcards/internal/adapter/controller/webutil"

Index

## func ApplyBool

func ApplyBool(field *bool, ptr *bool)

ApplyBool applies a bool pointer to a field in-place.

## func ApplyBoundedInt

func ApplyBoundedInt(field *int, ptr *int, lo, hi int)

ApplyBoundedInt applies a bounded int pointer to a field in-place.

## func BoolPtrOr

func BoolPtrOr(ptr *bool, defaultVal bool) bool

BoolPtrOr returns *ptr if non-nil, otherwise defaultVal.

## func BoundedIntPtr

func BoundedIntPtr(ptr *int, lo, hi, defaultVal int) int

BoundedIntPtr returns *ptr if non-nil and within [lo, hi], otherwise defaultVal.

Generated by gomarkdoc