feat(main): add silent mode to suppress output messages

* implement --silent flag to control output verbosity
* update error handling to restore stderr after silent mode
* enhance progress reporting in PostgreSQL reader
This commit is contained in:
2026-09-09 21:30:15 +02:00
parent 9e9a17d578
commit ee5c009234
8 changed files with 120 additions and 16 deletions
+6
View File
@@ -1,6 +1,9 @@
package main
import (
"fmt"
"os"
"git.warky.dev/wdevs/relspecgo/pkg/readers"
"git.warky.dev/wdevs/relspecgo/pkg/writers"
)
@@ -11,6 +14,9 @@ func newReaderOptions(filePath, connString string) *readers.ReaderOptions {
ConnectionString: connString,
Prisma7: prisma7,
StrictDirectives: strictDirectives,
Progress: func(message string) {
fmt.Fprintf(os.Stderr, " → %s\n", message)
},
}
}