mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-11 22:14:02 +01:00
build: add even more linting rules
Notably, shorten function signatures by not repeating types.
This commit is contained in:
@@ -152,9 +152,6 @@ func (c *Component) widgetTopHandlerFunc(gc *gin.Context) {
|
||||
}
|
||||
|
||||
switch uriParams.WidgetName {
|
||||
default:
|
||||
gc.JSON(http.StatusNotFound, gin.H{"message": "Unknown top request."})
|
||||
return
|
||||
case HomepageTopWidgetSrcAS:
|
||||
selector = fmt.Sprintf(`concat(toString(SrcAS), ': ', dictGetOrDefault('%s', 'name', SrcAS, '???'))`, schema.DictionaryASNs)
|
||||
groupby = `SrcAS`
|
||||
@@ -181,6 +178,9 @@ func (c *Component) widgetTopHandlerFunc(gc *gin.Context) {
|
||||
selector = fmt.Sprintf(`concat(dictGetOrDefault('%s', 'name', Proto, '???'), '/', toString(DstPort))`, schema.DictionaryProtocols)
|
||||
groupby = `Proto, DstPort`
|
||||
mainTableRequired = true
|
||||
default:
|
||||
gc.JSON(http.StatusNotFound, gin.H{"message": "Unknown top request."})
|
||||
return
|
||||
}
|
||||
if strings.HasPrefix(gc.Param("name"), "src-") {
|
||||
filter = "AND InIfBoundary = 'external'"
|
||||
|
||||
Reference in New Issue
Block a user