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
Use generated types from AVDL #21
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
5cb3d8b
Add a makefile for the bot
25b1f5c
Generate the bot types
84c759f
Replace Channel with chat1.ChatChannel
327af40
Replace Send with chat1.MsgSender
a926547
Replace Conversation with ConvSummary
4445b19
Replace Message with MsgSummary, and update message ids where needed
1ac83e9
Replace Leave and JoinChannelResult with EmptyRes
a1dd656
Replace ThreadResult with chat1.Thread
77a270e
Remove some unused structs
c71d4c0
Replace CommandsAdvertisement with chat1.AdvertiseCommandsParam
8fc7e32
Remove ThreadResult and MessageHolder
3cbed36
Replace wallet types
5917161
Fix an example
f88a386
Use stellar1.LocalPayment for listen
2894e83
Use keybase1.TeamMembersDetails instead of ListTeamMembersResultMembers
25d9997
Replace ListUserMembershipsResultTeam with keybase1.AnnotatedMemberInfo
046425a
Update readme
34e8dae
Add .gitattributes file
a272024
Add clean
d6e656e
Update some types in the readme
f32441b
Add go fmt after generated types
da26530
Output of 1.4.1
ed95be7
Explicit default goal
53bae36
Use goimports instead of go fmt
7b9f668
Skip types/
4ecf8f2
Have golangci-lint run vet and lint
bb4865d
Add dependencies to makefile
d5beee6
Add a note about goimports
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
kbchat/types/ linguist-generated=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,8 @@ linters: | |
- gofmt | ||
- gocritic | ||
- unconvert | ||
- govet | ||
- golint | ||
run: | ||
skip-dirs: | ||
- kbchat/types/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,11 @@ language: go | |
|
||
before_install: | ||
- go get golang.org/x/lint/golint | ||
- make dependencies | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you have a makefile in your go project, travis won't auto detect and install dependencies; it expects you to have a task for that. |
||
|
||
script: | ||
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.16.0 | ||
- golangci-lint run | ||
- go vet ./... | ||
- golint ./... | ||
|
||
go: | ||
- 1.10.x | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
PROTOCOL_PATH=../client/protocol | ||
AVDLC=$(PROTOCOL_PATH)/node_modules/.bin/avdlc | ||
|
||
.DEFAULT_GOAL := types | ||
|
||
types: | ||
@mkdir -p kbchat/types/{keybase1,gregor1,chat1,stellar1}/ | ||
$(AVDLC) -b -l go -t -o kbchat/types/keybase1 $(PROTOCOL_PATH)/avdl/keybase1/*.avdl | ||
$(AVDLC) -b -l go -t -o kbchat/types/gregor1 $(PROTOCOL_PATH)/avdl/gregor1/*.avdl | ||
$(AVDLC) -b -l go -t -o kbchat/types/chat1 $(PROTOCOL_PATH)/avdl/chat1/*.avdl | ||
$(AVDLC) -b -l go -t -o kbchat/types/stellar1 $(PROTOCOL_PATH)/avdl/stellar1/*.avdl | ||
goimports -w ./kbchat/types/ | ||
|
||
dependencies: | ||
go get github.com/stretchr/testify/require | ||
go get gopkg.in/yaml.v2 | ||
|
||
clean: | ||
rm -rf kbchat/types/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I moved
govet
andgolint
to be run by golanglint-ci instead of separately. Main reason for this is that it allows us to specify the same ignore config for all linters, but I believe it'd would also be faster?