-
Notifications
You must be signed in to change notification settings - Fork 3
Adds unused fmt library #4
Copy link
Copy link
Closed
Description
Description
Effe adds the import of fmt library.
Example from tests
package main
import (
"fmt"
"net/http"
)
func A(service AService) AFunc {
return func() (http.Request, error) {
err := service.Step1()
if err != nil {
return http.Request{}, err
}
requestVal, err := service.Step2()
if err != nil {
return requestVal, err
}
return requestVal, nil
}
}
func NewAImpl() *AImpl {
return &AImpl{step1FieldFunc: step1(), step2FieldFunc: step2()}
}
type AService interface {
Step1() error
Step2() (http.Request, error)
}
type AImpl struct {
step1FieldFunc func() error
step2FieldFunc func() (http.Request, error)
}
type AFunc func() (http.Request, error)
func (a *AImpl) Step1() error { return a.step1FieldFunc() }
func (a *AImpl) Step2() (http.Request, error) { return a.step2FieldFunc() }How to resolve it?
Disable adding this library when it's not used.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels