Skip to content
This repository has been archived by the owner on Jan 22, 2020. It is now read-only.

Add a go example to the sawtooth material #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

asettouf
Copy link

@asettouf asettouf commented Jan 7, 2018

Hello,

after following the lesson, I realized I wasn't so confident I could understand the application so I decided to kill 2 birds with one stone. Learn go, and ensure I understood what was happening with the Sawtooth example. And now that I have the example working, I believed it could be nice for people allergic to NodeJS to have a counterpart in a different language.

As of yet the features are working, if you have any recommendations to make the code cleaner, I'll be happy to implement them.

By the way, I had to commit the sawtooth_sdk as right now there is no go get that will easily retrieve the sdk (as opposed to fabric for instance) because some libraries needed by the sdk are not present and must be generated by cloning their repo (cf JIRA-STL-238)

Basically the equivalent of processor/index.js is src/processor/main.go and processor/handler.js is src/handler/handler.go. The rest is the sawtooth_sdk compiled

Signed-off-by: asettouf [email protected]

@asettouf asettouf force-pushed the feature/sawtooth_tuna_golang branch from 9f97287 to ca52e63 Compare January 8, 2018 20:52
@asettouf asettouf force-pushed the feature/sawtooth_tuna_golang branch from ca52e63 to c853aa4 Compare January 8, 2018 20:53
@tkuhrt
Copy link
Contributor

tkuhrt commented Jan 8, 2018

@asettouf : Thank you for the PR. I am wondering if it would make more sense to include this in the SDK examples directory of Hyperledger Sawtooth instead of including it in this material. Since the material in this repository was specifically for the source code covered in the edx.org LFS171x course people may expect the course to also cover the Go code.

@asettouf
Copy link
Author

asettouf commented Jan 8, 2018

@tkuhrt I believe you're making a good point of integrating the example with sawtooth directly, especially given that the Go SDK is about to get some modifications soon (https://jira.hyperledger.org/browse/STL-974). Is it ok if I use the client you already wrote?

As for this PR I would see 3 possibilities on your side:

  • Reject the current PR and keep the repository as it is
  • Reject the current PR and add a link as an "additional resource" from the course to the future example
  • Accept the PR, and put a mention to it as an example of how to do the same in Go

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants