-
Notifications
You must be signed in to change notification settings - Fork 0
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
Rename workflow folder and Fix the Dockerfile syntax #20
Conversation
df7d530
to
a93edb3
Compare
fix: fix workflow
fix: lint errors.
b3e3ec8
to
270d7a2
Compare
pkg/diameter/diameter.go
Outdated
m.NewAVP(avp.SessionID, avp.Mbit, 0, datatype.UTF8String(sid)) | ||
m.NewAVP(avp.OriginHost, avp.Mbit, 0, c.cfg.OriginHost) | ||
m.NewAVP(avp.OriginRealm, avp.Mbit, 0, c.cfg.OriginRealm) | ||
_, err = m.NewAVP(avp.SessionID, avp.Mbit, 0, datatype.UTF8String(sid)) |
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.
Adding if err != nil every time we increase the code for NewAVP reduces readability.
It would be great if you could simplify it like this.
for example.
type avpData struct {
code avp.Code
flag avp.Flag
vendor uint32
value datatype.Type
}
avps := []avpData{
{avp.SessionID, avp.Mbit, 0, datatype.UTF8String(sid)},
{avp.OriginHost, avp.Mbit, 0, c.cfg.OriginHost},
{avp.OriginRealm, avp.Mbit, 0, c.cfg.OriginRealm},
}
for _, avp := range avps {
if _, err := m.NewAVP(avp.code, avp.flag, avp.vendor, avp.value); err != nil {
return false, errors.WithMessagef(err, "NewAVP %v failed", avp.code) // fix format me
}
}
if options.DestinationHost == nil { | ||
m.NewAVP(avp.DestinationHost, avp.Mbit, 0, meta.OriginHost) | ||
_, err := m.NewAVP(avp.DestinationHost, avp.Mbit, 0, meta.OriginHost) |
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.
ditto
@@ -0,0 +1,59 @@ | |||
run: | |||
timeout: 15m | |||
skip-files: |
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 think this was taken from another project. so plz do not include it.
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.
:lgtm:
What
Why
Merge condition