fhelp

package module
v0.0.45 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: GPL-3.0 Imports: 18 Imported by: 26

README

forge help

originally a library to help common tasks for forge now it's a heap for whatever until it gets sorted into somewhere more sensible this, in other words, is a junk drawer for tools that don't have a home yet

Design Goals

  • handle input from STDIN when there is no GUI yet
  • help automate the recovery and build process for GO plugins

Notes

Try to make things easy.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPlugin added in v0.0.16

func BuildPlugin(pname string) bool

func CheckCmd

func CheckCmd(cmd string) (string, error)

never output anythhing to stdout or stderr here

func CheckGoModClean

func CheckGoModClean() bool

func CheckGoModCleanExit

func CheckGoModCleanExit()

func CheckProtoc

func CheckProtoc() bool

func DoBash added in v0.0.18

func DoBash(argname string)

makes a bash autocomplete file for your command

func FindGoWork added in v0.0.42

func FindGoWork() (string, bool)

findGoWork searches for a "go.work" file starting from the current directory and moving up the directory tree. It returns the path to the directory containing the file and a boolean indicating whether the file was found.

func GoWorkExists added in v0.0.42

func GoWorkExists(dir string) bool

func InputFromUser added in v0.0.27

func InputFromUser(msg string) string

func Install added in v0.0.14

func Install(pkg string) error

func MakeBashCompletionText added in v0.0.18

func MakeBashCompletionText(argname string) string

func PathRunRealtime added in v0.0.29

func PathRunRealtime(pwd string, args []string) cmd.Status

echos twice a second if anything sends to STDOUT or STDERR not great, but it's really just for watching things run in real time anyway TODO: fix \r handling for things like git-clone so the terminal doesn't have to do a \n newline each time. TODO: add timeouts and status of things hanging around forever

func QuestionUser added in v0.0.17

func QuestionUser(msg string) bool

func RemoveFirstElement added in v0.0.29

func RemoveFirstElement(slice []string) (string, []string)

this is stuff from a long time ago that there must be a replacement for

func RunRealtime added in v0.0.29

func RunRealtime(args []string) cmd.Status

func RunRealtimeError added in v0.0.31

func RunRealtimeError(args []string) (*cmd.Status, error)

func Sudo added in v0.0.29

func Sudo(cmd []string) error

func ValidProtobuf

func ValidProtobuf(filename string) (string, string, error)

This verifies a .proto file conforms to the autogenpb standard

That means, for "toy.proto", there MUST exist:

message toy { } message toys { }

this parses the .proto file and handles anything with `autogenpb: ` does the fruit.proto file have "message Fruits" does it have a Uuid & valid version ?

This returns (UUID, Version, error on failure)

Types

type ArgsGui added in v0.0.37

type ArgsGui struct {
}

This struct can be used with the go-arg package. These are the generic default command line arguments for the 'GUI' package

type GuiEmptyCmd added in v0.0.37

type GuiEmptyCmd struct {
}

type GuiPrep added in v0.0.37

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

func Gui added in v0.0.37

func Gui() *GuiPrep

func (*GuiPrep) Init added in v0.0.40

func (g *GuiPrep) Init() *gui.Node

me.gui = me.myGui.Init()

func (*GuiPrep) Start added in v0.0.37

func (g *GuiPrep) Start() error

Jump to

Keyboard shortcuts

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