Skip to content

Commit b7d83e7

Browse files
committed
Add example documentation
1 parent 94bfe87 commit b7d83e7

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

examples/standard_streams.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package examples
22

33
import "github.com/SimonBaeumer/cmd"
44

5+
// CreateNewCommandWithStandardStream create new standard stream example
56
func CreateNewCommandWithStandardStream() {
67
c := cmd.NewCommand("echo hello; sleep 1; echo another;", cmd.WithStandardStreams)
78
c.Execute()

examples/working_dir.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package examples
22

33
import "github.com/SimonBaeumer/cmd"
44

5+
// CreateWithWorkingDir sets the current working directory
56
func CreateWithWorkingDir() {
67
setWorkingDir := func(c *cmd.Command) {
78
c.WorkingDir = "/tmp"

0 commit comments

Comments
 (0)