Skip to content

Commit

Permalink
gosec: fixed gosec non-issue errors
Browse files Browse the repository at this point in the history
  • Loading branch information
arnabghose997 committed Nov 25, 2023
1 parent dcc22f5 commit c205b6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion x/ssi/ld-context/normalize.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func normalize(jsonLdDocument JsonLdDocument, algorithm string) (string, error)
}

// Convert JsonLdDid to interface
func jsonLdDocToInterface(jsonLd any) interface{} {
func jsonLdDocToInterface(jsonLd interface{}) interface{} {
var intf interface{}

jsonLdBytes, err := json.Marshal(jsonLd)
Expand Down
4 changes: 3 additions & 1 deletion x/ssi/types/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import (
// GetDidFromDidUrl returns didId from didURL.
// TODO: need to handle query and path
func GetElementsFromDidUrl(didUrl string) (string, string) {
didId, fragment, _ := strings.Cut(didUrl, "#")
didElements := strings.Split(didUrl, "#")
didId := didElements[0]
fragment := didElements[1]
return didId, fragment
}

Expand Down

0 comments on commit c205b6e

Please sign in to comment.