feat: fix format

This commit is contained in:
2023-04-06 22:33:29 +02:00
parent 8d514ab698
commit 44575dd763
2 changed files with 7 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ type Opts struct {
type OptsFunc func(ctx context.Context, o *Opts) error
func WithPath(path string) OptsFunc {
func withPath(path string) OptsFunc {
return func(ctx context.Context, o *Opts) error {
o.Path = path
@@ -26,7 +26,7 @@ func WithPath(path string) OptsFunc {
}
}
func Format(ctx context.Context, optsFuncs ...OptsFunc) error {
func format(ctx context.Context, optsFuncs ...OptsFunc) error {
opts := &Opts{
Path: ".",
IgnoredFiles: []string{
@@ -74,3 +74,7 @@ func Format(ctx context.Context, optsFuncs ...OptsFunc) error {
return nil
}
func Format(ctx context.Context) error {
return format(ctx)
}