Skip to content

Commit

Permalink
Resolved formatting issues in the magefile comments
Browse files Browse the repository at this point in the history
  • Loading branch information
l50 committed Oct 9, 2023
1 parent d5ddaa9 commit 307cfe2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 16 deletions.
1 change: 0 additions & 1 deletion docs/docGeneration.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,6 @@ func createFunctionDoc(fset *token.FileSet, fn *ast.FuncDecl) (FunctionDoc, erro

// Extract receiver (struct) name
if fn.Recv != nil && len(fn.Recv.List) > 0 {
// The receiver expression is of type *ast.StarExpr when it's a pointer
if se, ok := fn.Recv.List[0].Type.(*ast.StarExpr); ok {
structName = fmt.Sprintf("%s.", se.X)
} else {
Expand Down
11 changes: 4 additions & 7 deletions magefiles/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# goutils/v2/magefiles


`magefiles` provide utilities that would normally be managed
`magefiles` provides utilities that would normally be managed
and executed with a `Makefile`.
Table of contents:

Expand Down Expand Up @@ -65,10 +64,9 @@ RunPreCommit() error
RunPreCommit updates, clears, and executes all pre-commit hooks
locally. The function follows a three-step process:

1. Updates the pre-commit hooks using lint.UpdatePCHooks.
2. Clears the pre-commit cache with lint.ClearPCCache to ensure
a clean environment.
3. Executes all pre-commit hooks locally using lint.RunPCHooks.
First, it updates the pre-commit hooks.
Next, it clears the pre-commit cache to ensure a clean environment.
Lastly, it executes all pre-commit hooks locally.

Example usage:

Expand Down Expand Up @@ -155,7 +153,6 @@ error: an error if one occurred

---


## Contributing

Pull requests are welcome. For major changes,
Expand Down
7 changes: 3 additions & 4 deletions magefiles/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,9 @@ func GeneratePackageDocs() error {
// RunPreCommit updates, clears, and executes all pre-commit hooks
// locally. The function follows a three-step process:
//
// 1. Updates the pre-commit hooks using lint.UpdatePCHooks.
// 2. Clears the pre-commit cache with lint.ClearPCCache to ensure
// a clean environment.
// 3. Executes all pre-commit hooks locally using lint.RunPCHooks.
// First, it updates the pre-commit hooks.
// Next, it clears the pre-commit cache to ensure a clean environment.
// Lastly, it executes all pre-commit hooks locally.
//
// Example usage:
//
Expand Down
7 changes: 3 additions & 4 deletions magefiles/tmpl/README.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

{{if ne .PackageName "magefiles"}}The `{{.PackageName}}` package is a collection of utility functions
designed to simplify common {{.PackageName}} tasks.
{{else}}
`{{.PackageName}}` provide utilities that would normally be managed
{{else}}`{{.PackageName}}` provides utilities that would normally be managed
and executed with a `Makefile`.{{end}}
Table of contents:

Expand Down Expand Up @@ -58,8 +57,8 @@ command to execute the tests for `goutils/v2/{{.PackageName}}`:
go test -v
```

---{{end}}

---
{{end}}
## Contributing

Pull requests are welcome. For major changes,
Expand Down

0 comments on commit 307cfe2

Please sign in to comment.