func (c *Action) AddMatcher(p string) {
	c.IssueCommand(&Command{
		Name:    addMatcherCmd,
		Message: p,
	})
}
AddMatcher adds a new matcher with the given file path.
package githubactions
import (
	"fmt"
	"io"
	"io/ioutil"
	"os"
	"strings"
)
var (
	osExit = os.Exit
)
const (
	addMaskCmd   = "add-mask"
	setOutputCmd = "set-output"
	saveStateCmd = "save-state"
	addPathCmd = "add-path"  
	pathCmd    = "path"      
	setEnvCmd       = "set-env"         
	envCmd          = "env"             
	envCmdMsgFmt    = "%s<<%s\n%s\n%s"  
	envCmdDelimiter = "_GitHubActionsFileCommandDelimeter_"
	addMatcherCmd    = "add-matcher"
	removeMatcherCmd = "remove-matcher"
	groupCmd    = "group"
	endGroupCmd = "endgroup"
	debugCmd   = "debug"
	errorCmd   = "error"
	warningCmd = "warning"
	errFileCmdFmt = "unable to write command to the environment file: %s"
)
func New(opts ...Option) *Action {
	a := &Action{w: os.Stdout, getenv: os.Getenv}
	for _, opt := range opts {
		if opt == nil {
			continue
		}
		a = opt(a)
	}
	return a
}
func NewWithWriter(w io.Writer) *Action {
	return New(WithWriter(w))
}
type Action struct {
	w      io.Writer
	fields CommandProperties
	getenv GetenvFunc
}
func (c *Action) IssueCommand(cmd *Command) {
	fmt.Fprintln(c.w, cmd.String())
}
func (c *Action) IssueFileCommand(cmd *Command) error {
	e := strings.ReplaceAll(cmd.Name, "-", "_")
	e = strings.ToUpper(e)
	e = "GITHUB_" + e
	err := ioutil.WriteFile(c.getenv(e), []byte(cmd.Message+"\n"), os.ModeAppend)
	if err != nil {
		return fmt.Errorf(errFileCmdFmt, err)
	}
	return nil
}
func (c *Action) AddMask(p string) {
	c.IssueCommand(&Command{
		Name:    addMaskCmd,
		Message: p,
	})
}