Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cobra.Command{ Use: "Cat", Short: "copy an internal file to stdout", Long: `returns error status 1 if file not found.`, Run: func(cmd *cobra.Command, args []string) { clogFs := config.CoreFs() srcPath := args[0] src, err := clogFs.Open(core.Clean(srcPath)) if err != nil { slog.Error(fmt.Sprintf("cannot open embedded file %s", srcPath), "err", err) os.Exit(126) } defer src.Close() dst := os.Stdout nBytes, err := io.Copy(dst, src) if err != nil { slog.Error(fmt.Sprintf("cannot read embedded file %s (%d bytes copied)", srcPath, nBytes), "err", err) os.Exit(126) } }, }
Command define the cobra settings for this command
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.