pkg: address golangci var-naming issues

Signed-off-by: Ivan Valdes <ivan@vald.es>
This commit is contained in:
Ivan Valdes
2024-03-06 16:22:42 -08:00
parent 82925537e0
commit d98ff0d4ff
5 changed files with 17 additions and 17 deletions

View File

@@ -32,7 +32,7 @@ import (
"github.com/creack/pty"
)
const DEBUG_LINES_TAIL = 40
const debugLinesTail = 40
var (
ErrProcessRunning = fmt.Errorf("process is still running")
@@ -218,7 +218,7 @@ func (ep *ExpectProcess) ExpectFunc(ctx context.Context, f func(string) bool) (s
}
}
lastLinesIndex := len(ep.lines) - DEBUG_LINES_TAIL
lastLinesIndex := len(ep.lines) - debugLinesTail
if lastLinesIndex < 0 {
lastLinesIndex = 0
}

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package grpc_testing
package grpctesting
import (
"context"
@@ -22,7 +22,7 @@ import (
"google.golang.org/grpc/metadata"
)
type GrpcRecorder struct {
type GRPCRecorder struct {
mux sync.RWMutex
requests []RequestInfo
}
@@ -32,7 +32,7 @@ type RequestInfo struct {
Authority string
}
func (ri *GrpcRecorder) UnaryInterceptor() grpc.UnaryServerInterceptor {
func (ri *GRPCRecorder) UnaryInterceptor() grpc.UnaryServerInterceptor {
return func(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error) {
ri.record(toRequestInfo(ctx, info))
resp, err := handler(ctx, req)
@@ -40,7 +40,7 @@ func (ri *GrpcRecorder) UnaryInterceptor() grpc.UnaryServerInterceptor {
}
}
func (ri *GrpcRecorder) RecordedRequests() []RequestInfo {
func (ri *GRPCRecorder) RecordedRequests() []RequestInfo {
ri.mux.RLock()
defer ri.mux.RUnlock()
reqs := make([]RequestInfo, len(ri.requests))
@@ -62,7 +62,7 @@ func toRequestInfo(ctx context.Context, info *grpc.UnaryServerInfo) RequestInfo
return req
}
func (ri *GrpcRecorder) record(r RequestInfo) {
func (ri *GRPCRecorder) record(r RequestInfo) {
ri.mux.Lock()
defer ri.mux.Unlock()
ri.requests = append(ri.requests, r)

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package grpc_testing
package grpctesting
import (
"context"