You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These three functions in jws/jws.go are all semantically equivalent. Albeit the first two are identical function signatures so we can definitely remove one, but the third is a different signature but the same functionality, consider narrowing this down to a single function.
// Purpose is an option that can be passed to [github.com/tbd54566975/web5-go/jws.Sign].// It is used to select the appropriate key to sign withfuncPurpose(pstring) SignOpt {
returnfunc(opts*signOpts) {
opts.selector=didcore.Purpose(p)
}
}
// VerificationMethod is an option that can be passed to [github.com/tbd54566975/web5-go/jws.Sign].// It is used to select the appropriate key to sign withfuncVerificationMethod(idstring) SignOpt {
returnfunc(opts*signOpts) {
opts.selector=didcore.ID(id)
}
}
// VMSelector is an option that can be passed to [github.com/tbd54566975/web5-go/jws.Sign].// It is used to select the appropriate key to sign withfuncVMSelector(selector didcore.VMSelector) SignOpt {
returnfunc(opts*signOpts) {
opts.selector=selector
}
}
The text was updated successfully, but these errors were encountered:
These three functions in
jws/jws.go
are all semantically equivalent. Albeit the first two are identical function signatures so we can definitely remove one, but the third is a different signature but the same functionality, consider narrowing this down to a single function.The text was updated successfully, but these errors were encountered: