Skip to content

Commit

Permalink
Updated action.
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Nov 1, 2021
1 parent 147e877 commit 3992307
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ import (
"strconv"
)

var AutoDocStart = "<!-- AUTO-DOC-%s:START - Do not remove or modify this section -->"
var AutoDocEnd = "<!-- AUTO-DOC-%s:END -->"

var actionFileName string
var outputFileName string

Expand Down Expand Up @@ -93,7 +96,9 @@ var rootCmd = &cobra.Command{
inputTable.Append(row)
}

fmt.Printf(AutoDocStart, "INPUT")
inputTable.Render()
fmt.Printf(AutoDocEnd, "INPUT")
}

if len(action.Outputs) > 0 {
Expand All @@ -105,7 +110,9 @@ var rootCmd = &cobra.Command{
outputTable.Append(row)
}

fmt.Printf(AutoDocStart, "OUTPUT")
outputTable.Render()
fmt.Printf(AutoDocEnd, "OUTPUT")
}

outputFile, err := os.Open(outputFileName)
Expand Down

0 comments on commit 3992307

Please sign in to comment.