Skip to content

Commit

Permalink
cleanup-01; README.md, main.go edit the readmy -h text to have -l new…
Browse files Browse the repository at this point in the history
… option. then remove commented out code from main.go (#29)
  • Loading branch information
aguzmans authored Feb 29, 2024
1 parent 97b526e commit 4a85bca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 29 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ $ ./kompare -h
usage: print [-h|--help] [-c|--conf "<value>"] [-s|--src "<value>"] -t|--target
"<value>" [-v|--verbose] [-i|--include "<value>"] [-e|--exclude
"<value>"] [-n|--namespace "<value>"] [-f|--filter "<value>"]
[-l|--file "<value>"]
Prints provided string to stdout
Expand All @@ -53,6 +54,8 @@ Arguments:
-f --filter Filter what parts of the object I want to compare. must be
used together with -i option to apply to that type of
objects
-l --file Save the output to a file. If not provided, the output will
be printed to the console.
$
```

Expand Down
29 changes: 0 additions & 29 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,6 @@ func main() {
if args.FileOutput != "" {
defer tools.LogOutput(args.FileOutput)()
}
// var file *os.File
// if args.FileOutput != "" {
// _, fileString, _ := tools.IsValidPath(args.FileOutput)
// var err error
// file, err = os.Create(fileString)
// if err != nil {
// fmt.Println("Error opening file:", err)
// os.Exit(1)
// }
// defer file.Close()
// }
// // Create a multi-writer to write to both stdout and the file (if specified)
// var writers []io.Writer
// writers = append(writers, os.Stdout)
// if file != nil {
// writers = append(writers, file)
// }
// multiWriter := io.MultiWriter(writers...)
// // Use a goroutine to copy output to both stdout and the file
// go func(out io.Writer) {
// for {
// // Copy output to both stdout and the file
// _, err := io.Copy(out, os.Stdin)
// if err != nil {
// fmt.Println("Error copying output:", err)
// return
// }
// }
// }(multiWriter)

// Connect to source cluster
clientsetToSource, err := connect.ConnectToSource(args.SourceClusterContext, &args.KubeconfigFile)
Expand Down

0 comments on commit 4a85bca

Please sign in to comment.