Skip to content

Commit

Permalink
fix(ci): linter
Browse files Browse the repository at this point in the history
Signed-off-by: Godefroy Ponsinet <godefroy.ponsinet@outlook.com>
  • Loading branch information
90dy committed Sep 18, 2018
1 parent e5615ef commit 6870f37
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
40 changes: 20 additions & 20 deletions core/api/node/graphql/converts.go
Expand Up @@ -235,26 +235,26 @@ func convertEventKind(value p2p.Kind) *model.BertyP2pKind {
return &ret
}

func convertModelToP2pEventKind(value *model.BertyP2pKind) *p2p.Kind {
ret, ok := map[model.BertyP2pKind]p2p.Kind{
model.BertyP2pKindUnknown: p2p.Kind_Unknown,
model.BertyP2pKindSent: p2p.Kind_Sent,
model.BertyP2pKindAck: p2p.Kind_Ack,
model.BertyP2pKindPing: p2p.Kind_Ping,
model.BertyP2pKindContactRequest: p2p.Kind_ContactRequest,
model.BertyP2pKindContactRequestAccepted: p2p.Kind_ContactRequestAccepted,
model.BertyP2pKindContactShareMe: p2p.Kind_ContactShareMe,
model.BertyP2pKindContactShare: p2p.Kind_ContactShare,
model.BertyP2pKindConversationInvite: p2p.Kind_ConversationInvite,
model.BertyP2pKindConversationNewMessage: p2p.Kind_ConversationNewMessage,
}[*value]

if !ok {
t := p2p.Kind_Unknown
return &t
}
return &ret
}
// func convertModelToP2pEventKind(value *model.BertyP2pKind) *p2p.Kind {
// ret, ok := map[model.BertyP2pKind]p2p.Kind{
// model.BertyP2pKindUnknown: p2p.Kind_Unknown,
// model.BertyP2pKindSent: p2p.Kind_Sent,
// model.BertyP2pKindAck: p2p.Kind_Ack,
// model.BertyP2pKindPing: p2p.Kind_Ping,
// model.BertyP2pKindContactRequest: p2p.Kind_ContactRequest,
// model.BertyP2pKindContactRequestAccepted: p2p.Kind_ContactRequestAccepted,
// model.BertyP2pKindContactShareMe: p2p.Kind_ContactShareMe,
// model.BertyP2pKindContactShare: p2p.Kind_ContactShare,
// model.BertyP2pKindConversationInvite: p2p.Kind_ConversationInvite,
// model.BertyP2pKindConversationNewMessage: p2p.Kind_ConversationNewMessage,
// }[*value]
//
// if !ok {
// t := p2p.Kind_Unknown
// return &t
// }
// return &ret
// }

// func convertTime(value *time.Time) *string {
// if value == nil {
Expand Down
1 change: 0 additions & 1 deletion core/cmd/berty/daemon.go
Expand Up @@ -54,7 +54,6 @@ type daemonOptions struct {
hideBanner bool `mapstructure:"hide-banner"`
dropDatabase bool `mapstructure:"drop-database"`
initOnly bool `mapstructure:"init-only"`
bindgql string `mapstructure:"gql-bind"`

// p2p
identity string `mapstructure:"identity"`
Expand Down

0 comments on commit 6870f37

Please sign in to comment.