Skip to content
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

Fix GitHub warnings #931

Merged
merged 15 commits into from
Feb 17, 2023
Prev Previous commit
Next Next commit
fix github action warnings
  • Loading branch information
localvar committed Feb 9, 2023
commit 8cae22c0261716c9de029fa997fc133b879ec7e3
1 change: 1 addition & 0 deletions build/test/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package test is for integration testing.
package test

import (
Expand Down
1 change: 1 addition & 0 deletions cmd/client/command/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package command implements commands of Easegress client.
package command

import (
Expand Down
1 change: 1 addition & 0 deletions cmd/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package main is the entry point of Easegress client.
package main

import (
Expand Down
1 change: 1 addition & 0 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package main is the entry point of Easegress server.
package main

import (
Expand Down
1 change: 1 addition & 0 deletions example/backend-service/echo/echo.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package main is the entry point of the simple echo server.
package main

import (
Expand Down
1 change: 1 addition & 0 deletions example/backend-service/mirror/mirror.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package main is the entry point of the simple mirror server.
package main

import (
Expand Down
1 change: 1 addition & 0 deletions example/backend-service/remote/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package main is the entry point of the simple Easegress remote server.
package main

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package api implements the HTTP API of Easegress.
package api

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package cluster provides the cluster management.
package cluster

import (
Expand Down
2 changes: 2 additions & 0 deletions pkg/cluster/clustertest/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package clustertest provides a mocked cluster for testing.
package clustertest

import (
Expand Down Expand Up @@ -124,6 +125,7 @@ func (mc *MockedCluster) Put(key, value string) error {
return nil
}

// PutUnderTimeout implements interface function PutUnderTimeout
func (mc *MockedCluster) PutUnderTimeout(key, value string, timeout time.Duration) error {
if mc.MockedPutUnderTimeout != nil {
return mc.MockedPutUnderTimeout(key, value, timeout)
Expand Down
1 change: 1 addition & 0 deletions pkg/cluster/customdata/customdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package customdata provides a way to store custom data in Easegress cluster.
package customdata

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package common provides several common utilities for other packages.
package common

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package context provides the context for traffic handlers.
package context

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/context/contexttest/contexttest.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package contexttest provides utilities for testing context.
package contexttest

import "github.com/megaease/easegress/pkg/context"
Expand Down
1 change: 1 addition & 0 deletions pkg/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package env provides functions for environment variables.
package env

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/filters/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package builder implements builder filters.
package builder

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/filters/certextractor/certextractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package certextractor implements a filter to extract given field from TLS.
package certextractor

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/filters/connectcontrol/connectcontrol.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package connectcontrol implements filter for controlling connections of MQTT clients
package connectcontrol

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/filters/corsadaptor/corsadaptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package corsadaptor implements a filter that adapts CORS stuff.
package corsadaptor

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/filters/fallback/fallback.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package fallback implements the fallback filter.
package fallback

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/filters/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package filters implements common functionality of filters.
package filters

import (
Expand Down
2 changes: 2 additions & 0 deletions pkg/filters/headerlookup/headerlookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* limitations under the License.
*/

// Package headerlookup implements a filter that enriches request headers
// per request, looking up values from etcd.
package headerlookup

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/filters/headertojson/headertojson.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package headertojson implements a filter to convert HTTP request header to json.
package headertojson

import (
Expand Down
5 changes: 3 additions & 2 deletions pkg/filters/kafka/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package kafka implements a kafka proxy for MQTT requests.
package kafka

import (
Expand All @@ -36,7 +37,7 @@ const (

var kind = &filters.Kind{
Name: Kind,
Description: "Kafka is a backend of MQTTProxy",
Description: "Kafka is a kafka proxy for MQTT requests",
Results: []string{resultGetDataFailed},
DefaultSpec: func() filters.Spec {
return &Spec{}
Expand All @@ -51,7 +52,7 @@ func init() {
}

type (
// Kafka is kafka backend for MQTT proxy
// Kafka is a kafka proxy for MQTT requests.
Kafka struct {
spec *Spec
producer sarama.AsyncProducer
Expand Down
4 changes: 2 additions & 2 deletions pkg/filters/kafka/kafka_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ func (m *mockAsyncProducer) AbortTxn() error {
return nil
}

func (m *mockAsyncProducer) AddOffsetsToTxn(offsets map[string][]*sarama.PartitionOffsetMetadata, groupId string) error {
func (m *mockAsyncProducer) AddOffsetsToTxn(offsets map[string][]*sarama.PartitionOffsetMetadata, groupID string) error {
return nil
}

func (m *mockAsyncProducer) AddMessageToTxn(msg *sarama.ConsumerMessage, groupId string, metadata *string) error {
func (m *mockAsyncProducer) AddMessageToTxn(msg *sarama.ConsumerMessage, groupID string, metadata *string) error {
return nil
}

Expand Down
5 changes: 3 additions & 2 deletions pkg/filters/kafkabackend/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package kafka implements a kafka proxy for HTTP requests.
package kafka

import (
Expand All @@ -38,7 +39,7 @@ const (

var kind = &filters.Kind{
Name: Kind,
Description: "Kafka is a backend of MQTTProxy",
Description: "Kafka is a kafka proxy for HTTP requests",
Results: []string{resultParseErr},
DefaultSpec: func() filters.Spec {
return &Spec{}
Expand All @@ -53,7 +54,7 @@ func init() {
}

type (
// Kafka is kafka backend for MQTT proxy
// Kafka is a kafka proxy for HTTP requests.
Kafka struct {
spec *Spec
producer sarama.AsyncProducer
Expand Down
4 changes: 2 additions & 2 deletions pkg/filters/kafkabackend/kafka_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ func (m *mockAsyncProducer) AbortTxn() error {
return nil
}

func (m *mockAsyncProducer) AddOffsetsToTxn(offsets map[string][]*sarama.PartitionOffsetMetadata, groupId string) error {
func (m *mockAsyncProducer) AddOffsetsToTxn(offsets map[string][]*sarama.PartitionOffsetMetadata, groupID string) error {
return nil
}

func (m *mockAsyncProducer) AddMessageToTxn(msg *sarama.ConsumerMessage, groupId string, metadata *string) error {
func (m *mockAsyncProducer) AddMessageToTxn(msg *sarama.ConsumerMessage, groupID string, metadata *string) error {
return nil
}

Expand Down
1 change: 1 addition & 0 deletions pkg/filters/meshadaptor/meshadaptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package meshadaptor provides MeshAdaptor filter.
package meshadaptor

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/filters/mock/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package mock provides Mock filter.
package mock

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/filters/mqttclientauth/mqttauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

// Package mqttclientauth implements authentication for MQTT clients.
package mqttclientauth

import (
Expand Down