aboutsummaryrefslogtreecommitdiffstats
path: root/entity
diff options
context:
space:
mode:
Diffstat (limited to 'entity')
-rw-r--r--entity/dag/entity.go6
-rw-r--r--entity/dag/entity_actions.go2
-rw-r--r--entity/dag/operation_pack.go2
-rw-r--r--entity/id.go2
-rw-r--r--entity/id_interleaved.go2
-rw-r--r--entity/refs.go2
6 files changed, 8 insertions, 8 deletions
diff --git a/entity/dag/entity.go b/entity/dag/entity.go
index 60adcbe6..0760cdec 100644
--- a/entity/dag/entity.go
+++ b/entity/dag/entity.go
@@ -21,9 +21,9 @@ const editClockPattern = "%s-edit"
// Definition hold the details defining one specialization of an Entity.
type Definition struct {
- // the name of the entity (bug, pull-request, ...)
+ // the name of the entity (bug, pull-request, ...), for human consumption
Typename string
- // the Namespace in git (bugs, prs, ...)
+ // the Namespace in git references (bugs, prs, ...)
Namespace string
// a function decoding a JSON message into an Operation
OperationUnmarshaler func(author identity.Interface, raw json.RawMessage, resolver identity.Resolver) (Operation, error)
@@ -121,7 +121,7 @@ func read(def Definition, repo repository.ClockedRepo, resolver identity.Resolve
// Next step is to:
// 1) read the operationPacks
- // 2) make sure that the clocks causality respect the DAG topology.
+ // 2) make sure that clocks causality respect the DAG topology.
oppMap := make(map[repository.Hash]*operationPack)
var opsCount int
diff --git a/entity/dag/entity_actions.go b/entity/dag/entity_actions.go
index 2926e992..5b6e884d 100644
--- a/entity/dag/entity_actions.go
+++ b/entity/dag/entity_actions.go
@@ -89,7 +89,7 @@ func MergeAll(def Definition, repo repository.ClockedRepo, resolver identity.Res
return out
}
-// merge perform a merge to make sure a local Entity is up to date.
+// merge perform a merge to make sure a local Entity is up-to-date.
// See MergeAll for more details.
func merge(def Definition, repo repository.ClockedRepo, resolver identity.Resolver, remoteRef string, author identity.Interface) entity.MergeResult {
id := entity.RefToId(remoteRef)
diff --git a/entity/dag/operation_pack.go b/entity/dag/operation_pack.go
index 2794606a..8ca2ff56 100644
--- a/entity/dag/operation_pack.go
+++ b/entity/dag/operation_pack.go
@@ -81,7 +81,7 @@ func (opp *operationPack) Validate() error {
return nil
}
-// Write write the OperationPack in git, with zero, one or more parent commits.
+// Write writes the OperationPack in git, with zero, one or more parent commits.
// If the repository has a keypair able to sign (that is, with a private key), the resulting commit is signed with that key.
// Return the hash of the created commit.
func (opp *operationPack) Write(def Definition, repo repository.Repo, parentCommit ...repository.Hash) (repository.Hash, error) {
diff --git a/entity/id.go b/entity/id.go
index c8dbdb94..8f3dc25b 100644
--- a/entity/id.go
+++ b/entity/id.go
@@ -63,7 +63,7 @@ func (i Id) MarshalGQL(w io.Writer) {
_, _ = w.Write([]byte(`"` + i.String() + `"`))
}
-// IsValid tell if the Id is valid
+// Validate tell if the Id is valid
func (i Id) Validate() error {
// Special case to detect outdated repo
if len(i) == 40 {
diff --git a/entity/id_interleaved.go b/entity/id_interleaved.go
index 5423afee..0ce2ba00 100644
--- a/entity/id_interleaved.go
+++ b/entity/id_interleaved.go
@@ -22,7 +22,7 @@ import (
//
// A complete interleaved Id hold 50 characters for the primary and 14 for the
// secondary, which give a key space of 36^50 for the primary (~6 * 10^77) and
-// 36^14 for the secondary (~6 * 10^21). This asymmetry assume a reasonable number
+// 36^14 for the secondary (~6 * 10^21). This asymmetry assumes a reasonable number
// of secondary within a primary Entity, while still allowing for a vast key space
// for the primary (that is, a globally merged database) with a low risk of collision.
//
diff --git a/entity/refs.go b/entity/refs.go
index 070d4dba..6ba505b9 100644
--- a/entity/refs.go
+++ b/entity/refs.go
@@ -13,7 +13,7 @@ func RefsToIds(refs []string) []Id {
return ids
}
-// RefsToIds parse a git reference and return the corresponding Entity's Id.
+// RefToId parse a git reference and return the corresponding Entity's Id.
func RefToId(ref string) Id {
split := strings.Split(ref, "/")
return Id(split[len(split)-1])