Skip to content

Commit

Permalink
Adjust function declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
KendallWeihe committed Mar 19, 2024
1 parent 8e1b430 commit f179412
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dids/diddht/diddht.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type verificationMethodOption struct {

// Service is used to add a service to the DID being created with the [Create] function.
// Note: Service can be passed to [Create] multiple times to add multiple services.
func Service(id string, svcType string, endpoint []string) CreateOption {
func Service(id string, svcType string, endpoint ...string) CreateOption {
return func(o *createOptions) {
// ensure that id follows relative DID URL requirements defined in did core spec:
// https://www.w3.org/TR/did-core/#relative-did-urls
Expand Down
2 changes: 1 addition & 1 deletion dids/diddht/diddht_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func Test_Create(t *testing.T) {
var opts []CreateOption
opts = []CreateOption{Gateway(relay.URL, http.DefaultClient), KeyManager(keyMgr)}
for _, service := range didDoc.Service {
opts = append(opts, Service(service.ID, service.Type, service.ServiceEndpoint))
opts = append(opts, Service(service.ID, service.Type, service.ServiceEndpoint...))
}
for _, key := range test.keys {
opts = append(opts, PrivateKey(key.algorithmID, key.purposes...))
Expand Down

0 comments on commit f179412

Please sign in to comment.