config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Args

func Args(opts ...Options) []string

Args converts a variadic list of Options into a slice of command line argument strings.

Types

type Options

type Options map[string]any

Options is a type that represents a map of configuration options where the key is a string and the value can be any type. They are passed to Delve as command line option.

func Default

func Default() Options

Default returns an Options map with a default configuration settings for the application.

func Headless

func Headless() Options

Headless sets the "headless" option to true, which runs delve in server mode

func NoWait

func NoWait() Options

NoWait returns an Options map with settings to continue execution immediately. Debugged application wouldn't wait for a debugger to be attached.

func WaitDebugger

func WaitDebugger() Options

WaitDebugger returns an Options map with the "continue" option set to false, the debugged application will wait until a debugger is attached, after having generating a first log indicating on which endpoint it listens.

func WithApiVersion

func WithApiVersion(version int) Options

WithApiVersion sets the API version in the options with the specified version number.

func WithOption

func WithOption(key string, value ...any) Options

WithOption creates an Options instance with a given key and one or more values.

func WithPort

func WithPort(port int) Options

WithPort configures the listening port for the application by setting the "listen" option to the specified port.

Jump to

Keyboard shortcuts

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