feat: fix format
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user