Documentation ¶
Index ¶
Constants ¶
View Source
const ( // The name of the directory where all the commands summaries will be stored. // Inside this directory, each command will have its own directory. OutputDirName = "jfrog-command-summary" )
Variables ¶
This section is empty.
Functions ¶
func ShouldRecordSummary ¶
func ShouldRecordSummary() bool
If the output dir path is not defined, the command summary should not be recorded.
func UnmarshalFromFilePath ¶
Helper function to unmarshal data from a file path into the target object.
Types ¶
type CommandSummary ¶
type CommandSummary struct { CommandSummaryInterface // contains filtered or unexported fields }
func New ¶
func New(userImplementation CommandSummaryInterface, commandsName string) (cs *CommandSummary, err error)
Create a new instance of CommandSummary. Notice to check if the command should record the summary before calling this function. You can do this by calling the helper function ShouldRecordSummary.
func (*CommandSummary) Record ¶
func (cs *CommandSummary) Record(data any) (err error)
This function stores the current data on the file system. It then invokes the GenerateMarkdownFromFiles function on all existing data files. Finally, it saves the generated markdown file to the file system.
type CommandSummaryInterface ¶
Click to show internal directories.
Click to hide internal directories.