FAQ
https://codereview.appspot.com/6873060/diff/12001/ssh/certs.go
File ssh/certs.go (right):

https://codereview.appspot.com/6873060/diff/12001/ssh/certs.go#newcode47
ssh/certs.go:47: // and ecdsa-sha2-nistp521-cert-v01@openssh.com.
On 2012/12/13 11:16:03, dfc wrote:
Suggestion: Maybe the constants above should be exported, then we can move this
part of the comment to describe those directly.
Will do in a follow up CL.

https://codereview.appspot.com/6873060/diff/12001/ssh/keys.go
File ssh/keys.go (right):

https://codereview.appspot.com/6873060/diff/12001/ssh/keys.go#newcode124
ssh/keys.go:124: return key, in, ok
On 2012/12/13 11:16:03, dfc wrote:
/s/return.*/return/
Just return will only return out, rest, and ok which will be nil, nil,
true. Here I am following the convention we have with the other parse
functions and do an explicit return of key, in, ok so they should have
some value beyond nil.

https://codereview.appspot.com/6873060/diff/12001/ssh/keys.go#newcode347
ssh/keys.go:347: panic("unexpected key type")
On 2012/12/13 11:16:03, dfc wrote:
there are a lot of panics that all do the same thing. Is a label
useful here ?

Yeah, I agree. It does seem a bit excessive considering it just says the
same thing. A label would be good. We could also change the message
for each of these to give something more useful with respect to the
context at hand. For example...

panic("unexpected bit size for *ecdsa.PublicKey")
panic("unexpected public key type for ssh certificate")

Or we could change this function to return an error along with the
[]byte.

Which do you think works and reads best? I am fine with doing any of
those.

https://codereview.appspot.com/6873060/

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 6 | next ›
Discussion Overview
groupgolang-dev @
categoriesgo
postedDec 13, '12 at 11:16a
activeDec 13, '12 at 10:04p
posts6
users2
websitegolang.org

2 users in discussion

Dave: 3 posts Jmpittman: 3 posts

People

Translate

site design / logo © 2022 Grokbase