From b11679bc80b115c61a5cdee8ff8b5f8f1f69533d Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Thu, 10 Mar 2022 16:27:22 +0100 Subject: Fix a bunch of comments and documentations --- entity/dag/entity.go | 6 +++--- entity/dag/entity_actions.go | 2 +- entity/dag/operation_pack.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'entity/dag') diff --git a/entity/dag/entity.go b/entity/dag/entity.go index c4368514..ffdbe335 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) (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 5d74e13f..d825281b 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) { -- cgit