z0mbix/essh

can collapse some error printing

Closed this issue · 0 comments

essh/aws.go

Line 95 in f81dd8f

log.Errorln(ec2instanceconnect.ErrCodeAuthException, aerr.Error())

I think you can get rid of the entire switch statement and do

log.Errorln(aerr.Code(), aerr.Error())

as aero.Code() returns a string anyway