diff options
| author | ebiggers <ebiggers@google.com> | 2019-09-08 19:46:59 -0700 |
|---|---|---|
| committer | Joseph Richey <joerichey@google.com> | 2019-09-08 19:46:59 -0700 |
| commit | 6445dad7d66fa6a1867090fcd9602c98863649f6 (patch) | |
| tree | c0e5209f018a50ee8b0a1277cc7b06266eff18c1 /actions | |
| parent | 28b29d1c97ffd97671186b5e1fae37b64424f9ee (diff) | |
Fix various typos and grammatical errors (#141)
These were found by a combination of manual review and a custom script
that checks for common errors.
Also removed an outdated sentence from the comment for setupBefore().
Diffstat (limited to 'actions')
| -rw-r--r-- | actions/config.go | 2 | ||||
| -rw-r--r-- | actions/context.go | 10 | ||||
| -rw-r--r-- | actions/context_test.go | 2 | ||||
| -rw-r--r-- | actions/policy.go | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/actions/config.go b/actions/config.go index 6bc5239..386edc4 100644 --- a/actions/config.go +++ b/actions/config.go @@ -173,7 +173,7 @@ func getHashingCosts(target time.Duration) (*metadata.HashingCosts, error) { costsPrev := *costs tPrev := t - // Double the memory up to the max, then the double the time. + // Double the memory up to the max, then double the time. if costs.Memory < memoryKiBLimit { costs.Memory = util.MinInt64(2*costs.Memory, memoryKiBLimit) } else { diff --git a/actions/context.go b/actions/context.go index 8ad1357..4a8542b 100644 --- a/actions/context.go +++ b/actions/context.go @@ -56,7 +56,7 @@ type Context struct { // Config is the struct loaded from the global config file. It can be // modified after being loaded to customise parameters. Config *metadata.Config - // Mount is the filesystem relitive to which all Protectors and Policies + // Mount is the filesystem relative to which all Protectors and Policies // are added, edited, removed, and applied. Mount *filesystem.Mount // TargetUser is the user for which protectors are created and to whose @@ -67,7 +67,7 @@ type Context struct { // NewContextFromPath makes a context for the filesystem containing the // specified path and whose Config is loaded from the global config file. On // success, the Context contains a valid Config and Mount. The target defaults -// the the current effective user if none is specified. +// to the current effective user if none is specified. func NewContextFromPath(path string, target *user.User) (*Context, error) { ctx, err := newContextFromUser(target) if err != nil { @@ -85,7 +85,7 @@ func NewContextFromPath(path string, target *user.User) (*Context, error) { // NewContextFromMountpoint makes a context for the filesystem at the specified // mountpoint and whose Config is loaded from the global config file. On // success, the Context contains a valid Config and Mount. The target defaults -// the the current effective user if none is specified. +// to the current effective user if none is specified. func NewContextFromMountpoint(mountpoint string, target *user.User) (*Context, error) { ctx, err := newContextFromUser(target) if err != nil { @@ -102,7 +102,7 @@ func NewContextFromMountpoint(mountpoint string, target *user.User) (*Context, e // newContextFromUser makes a context with the corresponding target user, and // whose Config is loaded from the global config file. If the target is nil, the -// effecitive user is used. +// effective user is used. func newContextFromUser(target *user.User) (*Context, error) { var err error if target == nil { @@ -120,7 +120,7 @@ func newContextFromUser(target *user.User) (*Context, error) { return ctx, nil } -// checkContext verifies that the context contains an valid config and a mount +// checkContext verifies that the context contains a valid config and a mount // which is being used with fscrypt. func (ctx *Context) checkContext() error { if err := ctx.Config.CheckValidity(); err != nil { diff --git a/actions/context_test.go b/actions/context_test.go index 593518f..e8aefd7 100644 --- a/actions/context_test.go +++ b/actions/context_test.go @@ -1,5 +1,5 @@ /* - * config_test.go - tests for creating new contexts + * context_test.go - tests for creating new contexts * * Copyright 2017 Google Inc. * Author: Joe Richey (joerichey@google.com) diff --git a/actions/policy.go b/actions/policy.go index 39c235d..ef5f0a3 100644 --- a/actions/policy.go +++ b/actions/policy.go @@ -1,5 +1,5 @@ /* - * protector.go - functions for dealing with policies + * policy.go - functions for dealing with policies * * Copyright 2017 Google Inc. * Author: Joe Richey (joerichey@google.com) @@ -413,7 +413,7 @@ func (policy *Policy) addKey(toAdd *metadata.WrappedPolicyKey) { policy.data.WrappedPolicyKeys = append(policy.data.WrappedPolicyKeys, toAdd) } -// remove removes the wrapped policy key at the specified index. This +// removeKey removes the wrapped policy key at the specified index. This // does not preserve the order of the wrapped policy key array. If no index is // specified the last key is removed. func (policy *Policy) removeKey(index int) *metadata.WrappedPolicyKey { |