diff options
| author | 2026-05-18 03:17:57 +0000 | |
|---|---|---|
| committer | 2026-05-18 03:17:57 +0000 | |
| commit | ba961f83e4af276e32f501e5b1845ee864d340df (patch) | |
| tree | 35c84afead3a552b3259a11657b9fd9db314987a | |
| parent | object/signature: Just use a byte from the start (diff) | |
| signature | No signature | |
object/typ: Reformat a bit
| -rw-r--r-- | object/typ/doc.go | 4 | ||||
| -rw-r--r-- | object/typ/errors.go | 2 | ||||
| -rw-r--r-- | object/typ/type_details.go | 8 | ||||
| -rw-r--r-- | object/typ/type_ops.go | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/object/typ/doc.go b/object/typ/doc.go index 155d60eb..04b487dc 100644 --- a/object/typ/doc.go +++ b/object/typ/doc.go @@ -1,5 +1,5 @@ // Package typ provides Git object type enums and names. -// +package typ + // I would prefer naming this package "type" // if it wasn't a keyword. -package typ diff --git a/object/typ/errors.go b/object/typ/errors.go index 8a442db0..6df43222 100644 --- a/object/typ/errors.go +++ b/object/typ/errors.go @@ -2,4 +2,4 @@ package typ import "errors" -var ErrInvalidType = errors.New("object/typ: Invalid type")
\ No newline at end of file +var ErrInvalidType = errors.New("object/typ: Invalid type") diff --git a/object/typ/type_details.go b/object/typ/type_details.go index f8a18837..83938765 100644 --- a/object/typ/type_details.go +++ b/object/typ/type_details.go @@ -10,10 +10,10 @@ func (ty Type) details() typeDetails { //nolint:gochecknoglobals var typeTable = [...]typeDetails{ - TypeCommit: {name: "commit"}, - TypeTree: {name: "tree"}, - TypeBlob: {name: "blob"}, - TypeTag: {name: "tag"}, + TypeCommit: {name: "commit"}, + TypeTree: {name: "tree"}, + TypeBlob: {name: "blob"}, + TypeTag: {name: "tag"}, } //nolint:gochecknoglobals diff --git a/object/typ/type_ops.go b/object/typ/type_ops.go index 81570ab8..aaebb0eb 100644 --- a/object/typ/type_ops.go +++ b/object/typ/type_ops.go @@ -1,6 +1,6 @@ package typ // Name returns the canonical Git object type name. -func (ty Type) Name() (string) { +func (ty Type) Name() string { return ty.details().name } |
