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 with
func Purpose(p string) SignOpt {
return func(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 with
func VerificationMethod(id string) SignOpt {
return func(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 with
func VMSelector(selector didcore.VMSelector) SignOpt {
return func(opts *signOpts) {
opts.selector = selector
}
}
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.