cli

package
v0.28.4 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2023 License: MIT Imports: 5 Imported by: 0

README

CLI example

Code you write is - client.go and options.go. To generate options_generated.go you can just go generate like that:

go install github.com/kazhuravlev/options-gen/cmd/options-gen@latest

git clone git@github.com:kazhuravlev/options-gen.git
cd options-gen/examples/cli

go generate ./...

Documentation

Overview

Code generated by options-gen. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(opts Options) (*Client, error)

func (*Client) SendRequest

func (c *Client) SendRequest(ctx context.Context) error

type OptOptionsSetter added in v0.25.0

type OptOptionsSetter func(o *Options)

func WithAddr added in v0.28.0

func WithAddr(opt string) OptOptionsSetter

type Options

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

func NewOptions

func NewOptions(
	httpClient *http.Client,
	token string,
	options ...OptOptionsSetter,
) Options

func (*Options) Validate

func (o *Options) Validate() error

Jump to

Keyboard shortcuts

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