package options

import "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/options"

Index

Functions

func ApplyOptions

func ApplyOptions[O, C any](options O, callOptions []C) error

ApplyOptions applies all the callOptions to options. options must be a pointer to a struct and callOptions must be a list of objects that implement CallOption.

Types

type CallOption

type CallOption interface {
	Do(any) error
	// contains filtered or unexported methods
}

CallOption implements an optional argument to a method call. See https://blog.devgenius.io/go-call-option-that-can-be-used-with-multiple-methods-6c81734f3dbe for an explanation of the usage pattern.

func NewCallOption

func NewCallOption(f func(any) error) CallOption

NewCallOption returns a new CallOption whose Do() method calls function "f".

Source Files

options.go

Version
v1.4.2 (latest)
Published
Mar 26, 2025
Platform
linux/amd64
Imports
2 packages
Last checked
2 days ago

Tools for package owners.