Skip to content

Commit f10be08

Browse files
authored
Use the correct form of sha256.Sum256. (#214)
`sha256.New().Sum(foo)` appends the SHA-256 hash for nil to foo.
1 parent 2d6ed2f commit f10be08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/commands/interceptor/process.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func parseProcess(required bool, idFlagName, nameFlagName, instanceIDFlagName st
8383
if instanceID == "" {
8484
return fmt.Errorf(`"--%s" is specified but its related service name or id is not given`, nameFlagName)
8585
}
86-
id = fmt.Sprintf("%x", sha256.New().Sum([]byte(fmt.Sprintf("%s_%s", instanceID, name))))
86+
id = fmt.Sprintf("%x", sha256.Sum256([]byte(fmt.Sprintf("%s_%s", instanceID, name))))
8787
}
8888

8989
return ctx.Set(idFlagName, id)

0 commit comments

Comments
 (0)