cli/compose: fix "unused-receiver" linting

cli/compose/schema/schema.go:25:7: unused-receiver: method receiver 'checker' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (checker portsFormatChecker) IsFormat(input any) bool {
          ^
    cli/compose/schema/schema.go:41:7: unused-receiver: method receiver 'checker' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (checker durationFormatChecker) IsFormat(input any) bool {
          ^
    cli/compose/loader/loader.go:272:7: unused-receiver: method receiver 'e' is not referenced in method's body, consider removing or renaming it as _ (revive)
    func (e *ForbiddenPropertiesError) Error() string {
          ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2025-02-17 13:41:19 +01:00
parent 1e7add9f4b
commit 20b4ab366e
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
2 changed files with 3 additions and 3 deletions

View File

@ -269,7 +269,7 @@ type ForbiddenPropertiesError struct {
Properties map[string]string
}
func (e *ForbiddenPropertiesError) Error() string {
func (*ForbiddenPropertiesError) Error() string {
return "Configuration contains forbidden properties"
}

View File

@ -22,7 +22,7 @@ const (
type portsFormatChecker struct{}
func (checker portsFormatChecker) IsFormat(input any) bool {
func (portsFormatChecker) IsFormat(input any) bool {
var portSpec string
switch p := input.(type) {
@ -38,7 +38,7 @@ func (checker portsFormatChecker) IsFormat(input any) bool {
type durationFormatChecker struct{}
func (checker durationFormatChecker) IsFormat(input any) bool {
func (durationFormatChecker) IsFormat(input any) bool {
value, ok := input.(string)
if !ok {
return false