Documentation ¶
Overview ¶
Package action contains the type Action and some basic actions.
The actions are functions that act on the file system (although they do not necessarily have to do it).
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Print ¶
Print prints the arguments provided in the standard output, this does not print spaces between the arguments, nor does it add a line break at the end.
Example ¶
package main import ( "github.com/anderson-lt/fairu/action" ) func main() { action.Print("/a/path", []string{"0", "1", "2", "3"}) }
Output: 0123
func PrintAlternative ¶ added in v0.2.1
PrintAlternative is similar to Print, but, write on the standard error output.
func Say ¶ added in v0.2.1
Say print the arguments provided in the standard output and format them by separating those with a space and adding a line break at the end.
Example ¶
package main import ( "github.com/anderson-lt/fairu/action" ) func main() { action.Say("/a/path", []string{"Hello", "World!"}) }
Output: Hello World!
func SayAlternative ¶ added in v0.2.1
SayAlternative is similar to Say, but, write on the standard error output.
Types ¶
type Action ¶
Action represents the signature of an action, where path refers to the action path and arguments of the action. Returns a newPath chain that specifies the new acting path, for example, when the file moves, an empty string indicates that the file was deleted. If the file path is not modified, you must return where it was provided in path.