Merged in feature/document (pull request #36)
Document CRUD * doccreate * dochashlocandget * depsandtodo
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package documentclean
|
||||
|
||||
import "errors"
|
||||
|
||||
type Service struct {
|
||||
}
|
||||
|
||||
func New() *Service {
|
||||
return &Service{}
|
||||
}
|
||||
|
||||
func (s *Service) IsValidVersion(v int32) error {
|
||||
if v <= 0 {
|
||||
return errors.New("document clean code version must be > 0")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package documentclean_test
|
||||
|
||||
import (
|
||||
documentclean "queryorchestration/internal/document/clean"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestService(t *testing.T) {
|
||||
svc := documentclean.New()
|
||||
assert.NotNil(t, svc)
|
||||
}
|
||||
Reference in New Issue
Block a user