Skip to content

Commit 7b035c0

Browse files
committed
docs: improve documentation
1 parent d2612f1 commit 7b035c0

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## About the project
44

5-
`mikro\_s` is a Go framework for creating applications.
5+
`mikro_s` is a Go framework for creating applications.
66

77
## Contributing
88

service.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -591,18 +591,18 @@ func (s *Service) stopDependentServices(ctx context.Context) error {
591591
return nil
592592
}
593593

594-
// Logger gives access to the utils/logger API from inside a service context.
594+
// Logger gives access to the logger API from inside a service context.
595595
func (s *Service) Logger() loggerApi.Logger {
596596
return s.logger
597597
}
598598

599-
// Errors gives access to the utils/errors API from inside a service context.
599+
// Errors gives access to the errors API from inside a service context.
600600
func (s *Service) Errors() errorsApi.ErrorFactory {
601601
return s.errors
602602
}
603603

604-
// Abort is a helper method to abort services in the right way, in external
605-
// initialization, when an error checking is required.
604+
// Abort is a helper method to abort services in the right way, when external
605+
// initialization is needed.
606606
func (s *Service) Abort(message string, err error) {
607607
s.abort(context.TODO(), merrors.NewAbortError(message, err))
608608
}
@@ -701,8 +701,8 @@ func (s *Service) SetupTest(ctx context.Context, t *testing.Testing) *ServiceTes
701701
return setupServiceTesting(ctx, s, t)
702702
}
703703

704-
// CustomDefinitions gives the service access to its custom settings that
705-
// it may have put inside the 'service.toml' file.
704+
// CustomDefinitions gives the service access to the service custom settings
705+
// that it may have put inside the 'service.toml' file.
706706
//
707707
// Note that these settings correspond to everything under the [service]
708708
// object inside the TOML file.

testing.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ import (
88
"github.com/somatech1/mikros/components/testing"
99
)
1010

11-
// ServiceTesting is an object by a Service.SetupTest call. It should be used
12-
// to create unit tests that needs to use features (internal or external).
11+
// ServiceTesting is an object created by a Service.SetupTest call.
12+
//
13+
// It should be used when creating unit tests that need to use features,
14+
// internal or external, and require some kind of setup/teardown mechanism.
1315
type ServiceTesting struct {
1416
svc *Service
1517
test *testing.Testing
@@ -36,7 +38,7 @@ func setupServiceTesting(ctx context.Context, svc *Service, t *testing.Testing)
3638
return svcTest
3739
}
3840

39-
// Teardown releases every resource allocated in the SetupTest call.
41+
// Teardown releases every resource allocated by the SetupTest call.
4042
func (s *ServiceTesting) Teardown(ctx context.Context) {
4143
iter := s.svc.features.Iterator()
4244
for p, next := iter.Next(); next; p, next = iter.Next() {

0 commit comments

Comments
 (0)