Skip to content

feat: change bindcom.Command to a struct#16

Merged
alanshaw merged 1 commit into
mainfrom
ash/feat/bindcom-command-struct
May 19, 2026
Merged

feat: change bindcom.Command to a struct#16
alanshaw merged 1 commit into
mainfrom
ash/feat/bindcom-command-struct

Conversation

@alanshaw
Copy link
Copy Markdown
Member

@alanshaw alanshaw commented May 19, 2026

re: fil-forge/libforge#26 (comment)

Instead of:

// content/retrieve.go

Retrieve := bindcom.Parse[*RetrieveArgs]("/content/retrieve")

// server.go

s := retrieval.NewServer(service)
s.Handle(ucan.Command(content.Retrieve), /* ... */)

You can do:

s.Handle(content.Retrieve.Command, /* ... */)

Alternative to #15

Copy link
Copy Markdown
Contributor

@Peeja Peeja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this seems like it works well enough. 👍🏻

@alanshaw alanshaw merged commit ad31490 into main May 19, 2026
1 check passed
@alanshaw alanshaw deleted the ash/feat/bindcom-command-struct branch May 19, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants