Skip to content

Commit

Permalink
Use Must for flag
Browse files Browse the repository at this point in the history
  • Loading branch information
itaigilo committed Feb 10, 2025
1 parent 4b19558 commit 382207a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions cmd/lakectl/cmd/repo_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ var repoCreateCmd = &cobra.Command{

defaultBranch := Must(cmd.Flags().GetString(defaultBranchFlagName))
sampleData := Must(cmd.Flags().GetBool(sampleDataFlagName))
storageID, err := cmd.Flags().GetString(storageIDFlagName)
if err != nil {
DieErr(err)
}
storageID := Must(cmd.Flags().GetString(storageIDFlagName))

resp, err := clt.CreateRepositoryWithResponse(cmd.Context(),
&apigen.CreateRepositoryParams{},
Expand Down
2 changes: 1 addition & 1 deletion cmd/lakectl/cmd/repo_create_bare.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var repoCreateBareCmd = &cobra.Command{
fmt.Println("Repository:", u)

defaultBranch := Must(cmd.Flags().GetString(defaultBranchFlagName))
storageID, _ := cmd.Flags().GetString(storageIDFlagName)
storageID := Must(cmd.Flags().GetString(storageIDFlagName))

bareRepo := true

Expand Down

0 comments on commit 382207a

Please sign in to comment.