-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(shared): add shared tools and types #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, just some non-blocking comments. It seems like the tab settings are 8/6 for this? Do we care? I don't particularly care; not sure if it is a FC-wide code style to have 4/4.
@@ -26,6 +26,8 @@ const ( | |||
ExtensionDataTransfer = graphsync.ExtensionName("fil/data-transfer") | |||
) | |||
|
|||
//go:generate cbor-gen-for ExtensionDataTransferData |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty cool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait till it breaks though...
@@ -18,7 +18,7 @@ func NewLocalFileStore(basedirectory string) (FileStore, error) { | |||
break | |||
} | |||
} | |||
base := basedirectory[0:i + 1] | |||
base := basedirectory[0 : i+1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's like path.Clean
, path.Join
that can do some of the path manipulation in this file...
go.mod
Outdated
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 | ||
google.golang.org/appengine v1.5.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appengine!
7001c47
to
cc56e38
Compare
- copy important types from lotus - copy over address, cborutil, and crypto library - switch to generating cbor through cbor-gen-for + go-generate - run go fmt (hadn't been run) - remove external depedencies on lotus
cc56e38
to
7951303
Compare
Goals
Move a bunch of shared stuff over from lotus so we can work with things internally
Implementation
//go:generate cbor-gen-for ~structName~
comment near the struct that needs cbor methods and then just rungo generate ./...