Help us shape the future of Go! Take the 2026 Go Developer Survey

strategy

package
v1.4.167 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultStrategiesGitRepoFolder = "strategies"
View Source
const DefaultStrategiesGitRepoUrl = "https://github.com/danielmiessler/fabric.git"

Variables

This section is empty.

Functions

func LoadAllFiles

func LoadAllFiles() (strategies map[string]Strategy, err error)

Types

type StrategiesManager

type StrategiesManager struct {
	*plugins.PluginBase
	Strategies map[string]Strategy

	DefaultGitRepoUrl *plugins.SetupQuestion
	DefaultFolder     *plugins.SetupQuestion
}

func NewStrategiesManager

func NewStrategiesManager() (sm *StrategiesManager)

func (*StrategiesManager) IsConfigured

func (sm *StrategiesManager) IsConfigured() (ret bool)

func (*StrategiesManager) ListStrategies

func (sm *StrategiesManager) ListStrategies() error

ListStrategies prints available strategies

func (*StrategiesManager) PopulateDB

func (sm *StrategiesManager) PopulateDB() (err error)

PopulateDB downloads strategies from the internet and populates the strategies folder

func (*StrategiesManager) Setup

func (sm *StrategiesManager) Setup() (err error)

type Strategy

type Strategy struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Prompt      string `json:"prompt"`
}

func LoadStrategy

func LoadStrategy(filename string) (*Strategy, error)

LoadStrategy loads a strategy from the given name

Jump to

Keyboard shortcuts

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