Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
ianthpun committed May 24, 2024
1 parent a4eb17d commit 080fae8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions runtime/format/capability.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,16 @@ import (
"fmt"
)

func PathCapability(address string, id string, path string) string {
func DeprecatedPathCapability(borrowType string, address string, path string) string {
var typeArgument string
if borrowType != "" {
typeArgument = fmt.Sprintf("<%s>", borrowType)
}

return fmt.Sprintf(
"Path(address: %s, id: %s, path %s)",
"Capability%s(address: %s, path: %s)",
typeArgument,
address,
id,
path,
)
}
Expand Down
2 changes: 1 addition & 1 deletion values.go
Original file line number Diff line number Diff line change
Expand Up @@ -2134,7 +2134,7 @@ func (v DeprecatedPathCapability) String() string {
borrowType = v.BorrowType.ID()
}

return format.PathCapability(
return format.DeprecatedPathCapability(
borrowType,
v.Address.String(),
v.Path.String(),
Expand Down

0 comments on commit 080fae8

Please sign in to comment.