Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: mark unused flags as deprecated #90

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions cmd/ksync/commands/blocksync.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ func init() {
blockSyncCmd.Flags().BoolVarP(&flags.AppLogs, "app-logs", "l", false, "show logs from cosmos app")
blockSyncCmd.Flags().BoolVarP(&flags.Y, "yes", "y", false, "automatically answer yes for all questions")

// deprecated flags
blockSyncCmd.Flags().StringVarP(&flags.Engine, "engine", "e", "", "")
_ = blockSyncCmd.Flags().MarkDeprecated("engine", "engine is detected automatically")

blockSyncCmd.Flags().StringVarP(&flags.Source, "source", "s", "", "")
_ = blockSyncCmd.Flags().MarkDeprecated("source", "source is detected automatically")

blockSyncCmd.Flags().StringVar(&flags.RegistryUrl, "registry-url", "", "")
_ = blockSyncCmd.Flags().MarkDeprecated("registry-url", "registry url is fixed")

RootCmd.AddCommand(blockSyncCmd)
}

Expand Down
10 changes: 10 additions & 0 deletions cmd/ksync/commands/heightsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ func init() {
heightSyncCmd.Flags().BoolVarP(&flags.AppLogs, "app-logs", "l", false, "show logs from cosmos app")
heightSyncCmd.Flags().BoolVarP(&flags.Y, "assumeyes", "y", false, "automatically answer yes for all questions")

// deprecated flags
heightSyncCmd.Flags().StringVarP(&flags.Engine, "engine", "e", "", "")
_ = heightSyncCmd.Flags().MarkDeprecated("engine", "engine is detected automatically")

heightSyncCmd.Flags().StringVarP(&flags.Source, "source", "s", "", "")
_ = heightSyncCmd.Flags().MarkDeprecated("source", "source is detected automatically")

heightSyncCmd.Flags().StringVar(&flags.RegistryUrl, "registry-url", "", "")
_ = heightSyncCmd.Flags().MarkDeprecated("registry-url", "registry url is fixed")

RootCmd.AddCommand(heightSyncCmd)
}

Expand Down
10 changes: 10 additions & 0 deletions cmd/ksync/commands/serveblocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ func init() {
serveBlocksCmd.Flags().BoolVarP(&flags.AppLogs, "app-logs", "l", false, "show logs from cosmos app")
serveBlocksCmd.Flags().BoolVarP(&flags.Y, "yes", "y", false, "automatically answer yes for all questions")

// deprecated flags
serveBlocksCmd.Flags().StringVarP(&flags.Engine, "engine", "e", "", "")
_ = serveBlocksCmd.Flags().MarkDeprecated("engine", "engine is detected automatically")

serveBlocksCmd.Flags().StringVarP(&flags.Source, "source", "s", "", "")
_ = serveBlocksCmd.Flags().MarkDeprecated("source", "source is detected automatically")

serveBlocksCmd.Flags().StringVar(&flags.RegistryUrl, "registry-url", "", "")
_ = serveBlocksCmd.Flags().MarkDeprecated("registry-url", "registry url is fixed")

RootCmd.AddCommand(serveBlocksCmd)
}

Expand Down
10 changes: 10 additions & 0 deletions cmd/ksync/commands/servesnapshots.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ func init() {
servesnapshotsCmd.Flags().BoolVarP(&flags.Debug, "debug", "d", false, "run KSYNC in debug mode")
servesnapshotsCmd.Flags().BoolVarP(&flags.AppLogs, "app-logs", "l", false, "show logs from cosmos app")

// deprecated flags
servesnapshotsCmd.Flags().StringVarP(&flags.Engine, "engine", "e", "", "")
_ = servesnapshotsCmd.Flags().MarkDeprecated("engine", "engine is detected automatically")

servesnapshotsCmd.Flags().StringVarP(&flags.Source, "source", "s", "", "")
_ = servesnapshotsCmd.Flags().MarkDeprecated("source", "source is detected automatically")

servesnapshotsCmd.Flags().StringVar(&flags.RegistryUrl, "registry-url", "", "")
_ = servesnapshotsCmd.Flags().MarkDeprecated("registry-url", "registry url is fixed")

RootCmd.AddCommand(servesnapshotsCmd)
}

Expand Down
10 changes: 10 additions & 0 deletions cmd/ksync/commands/statesync.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ func init() {
stateSyncCmd.Flags().BoolVarP(&flags.AppLogs, "app-logs", "l", false, "show logs from cosmos app")
stateSyncCmd.Flags().BoolVarP(&flags.Y, "yes", "y", false, "automatically answer yes for all questions")

// deprecated flags
stateSyncCmd.Flags().StringVarP(&flags.Engine, "engine", "e", "", "")
_ = stateSyncCmd.Flags().MarkDeprecated("engine", "engine is detected automatically")

stateSyncCmd.Flags().StringVarP(&flags.Source, "source", "s", "", "")
_ = stateSyncCmd.Flags().MarkDeprecated("source", "source is detected automatically")

stateSyncCmd.Flags().StringVar(&flags.RegistryUrl, "registry-url", "", "")
_ = stateSyncCmd.Flags().MarkDeprecated("registry-url", "registry url is fixed")

RootCmd.AddCommand(stateSyncCmd)
}

Expand Down
6 changes: 6 additions & 0 deletions flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,10 @@ var (
OptOut bool
Debug bool
Y bool
// Engine is deprecated
Engine string
// Source is deprecated
Source string
// RegistryUrl is deprecated
RegistryUrl string
)
Loading