boot

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2025 License: MIT Imports: 8 Imported by: 26

Documentation

Overview

Package boot contains an extension of goyek.Main which additionally defines flags and configures the flow in a convenient way.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main()

Main is an extension of goyek.Main which additionally defines reusable flags and configures the flow with the most useful middlewares.

It automatically sets up:

The command line syntax is: [tasks] [flags] [--] [args]

To add custom flags, define them before calling Main (see the example).

Example
package main

import (
	"flag"

	"github.com/goyek/goyek/v3"

	"github.com/goyek/x/boot"
)

var msg = flag.String("msg", "hello world", `message to display by "hi" task`)

var _ = goyek.Define(goyek.Task{
	Name:  "hi",
	Usage: "Greetings",
	Action: func(a *goyek.A) {
		a.Log(*msg)
	},
})

func main() {
	boot.Main()
}

Types

This section is empty.

Jump to

Keyboard shortcuts

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