Skip to content

Commit

Permalink
style: second round of linting (#15607)
Browse files Browse the repository at this point in the history
Co-authored-by: Julien Robert <julien@rbrt.fr>
  • Loading branch information
tac0turtle and julienrbrt authored Mar 30, 2023
1 parent 68cd9c5 commit bbaa535
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
3 changes: 1 addition & 2 deletions tools/hubl/internal/compat.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ func addMissingFileDescriptors(ctx context.Context, client *grpc.ClientConn, fdM
panic(err)
}

switch res := in.MessageResponse.(type) {
case *grpc_reflection_v1alpha.ServerReflectionResponse_FileDescriptorResponse:
if res, ok := in.MessageResponse.(*grpc_reflection_v1alpha.ServerReflectionResponse_FileDescriptorResponse); ok {
processFileDescriptorsResponse(res, fdMap)
}
}
Expand Down
2 changes: 1 addition & 1 deletion tools/hubl/internal/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func SaveConfig(configDir string, config *Config) error {
}

configPath := configFilename(configDir)
if err := os.WriteFile(configPath, buf.Bytes(), 0o644); err != nil {
if err := os.WriteFile(configPath, buf.Bytes(), 0o600); err != nil {
return err
}

Expand Down
4 changes: 2 additions & 2 deletions tools/hubl/internal/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (c *ChainInfo) Load(reload bool) error {
return err
}

if err = os.WriteFile(fdsFilename, bz, 0o644); err != nil {
if err = os.WriteFile(fdsFilename, bz, 0o600); err != nil {
return err
}
} else {
Expand Down Expand Up @@ -133,7 +133,7 @@ func (c *ChainInfo) Load(reload bool) error {
return err
}

err = os.WriteFile(appOptsFilename, bz, 0o644)
err = os.WriteFile(appOptsFilename, bz, 0o600)
if err != nil {
return err
}
Expand Down
7 changes: 4 additions & 3 deletions tools/hubl/internal/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,13 @@ func RemoteCommand(config *Config, configDir string) ([]*cobra.Command, error) {
Use: chain,
Short: fmt.Sprintf("Commands for the %s chain", chain),
RunE: func(cmd *cobra.Command, args []string) error {
if reconfig {
switch {
case reconfig:
return reconfigure(cmd, config, configDir, chain)
} else if update {
case update:
cmd.Printf("Updating autocli data for %s\n", chain)
return chainInfo.Load(true)
} else {
default:
return cmd.Help()
}
},
Expand Down
2 changes: 1 addition & 1 deletion x/nft/keeper/nft.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (k Keeper) GetNFTsOfClass(ctx context.Context, classID string) (nfts []nft.
}

// GetOwner returns the owner information of the specified nft
func (k Keeper) GetOwner(ctx context.Context, classID string, nftID string) sdk.AccAddress {
func (k Keeper) GetOwner(ctx context.Context, classID, nftID string) sdk.AccAddress {
store := k.storeService.OpenKVStore(ctx)
bz, err := store.Get(ownerStoreKey(classID, nftID))
if err != nil {
Expand Down

0 comments on commit bbaa535

Please # to comment.