factory

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClient

func GetClient(cfg *config.Config) *repoflow.Client

func HandleOutput

func HandleOutput(u *Utils, data any) error

Types

type Utils

type Utils struct {
	Cfg    *config.Config
	Logger *slog.Logger
	Output string
	// contains filtered or unexported fields
}

func (*Utils) GetAPIClient

func (u *Utils) GetAPIClient() *repoflow.Client

func (*Utils) HandleResponse

func (u *Utils) HandleResponse(resp *http.Response) error

handleResponse processes the API response. If it's an error, it returns an error with the body content. If it's a success, it returns nil so the caller can proceed with decoding.

func (*Utils) TableFormat

func (u *Utils) TableFormat(out io.Writer, data interface{}) error

Jump to

Keyboard shortcuts

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