17 lines
241 B
Go
17 lines
241 B
Go
package service
|
|
|
|
import "fmt"
|
|
|
|
type Service interface {
|
|
Name() string
|
|
Use() interface{}
|
|
}
|
|
|
|
type ErrServiceNotFound struct {
|
|
Name string
|
|
}
|
|
|
|
func (e ErrServiceNotFound) Error() string {
|
|
return fmt.Sprintf("service %s not found", e.Name)
|
|
}
|