Skip to content

Commit

Permalink
fix: small typos through scripts folder
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodmanBen committed Mar 8, 2022
1 parent 592737d commit 0743349
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 10 deletions.
2 changes: 0 additions & 2 deletions command/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ func (c *ApplyCommand) Run(args []string) int {
return 0
}

// TODO: The file runner and history runner is what actually runs the apply/plan functions
// TODO: Elements of the config contain information on remote backend type
// applyWithoutHistory is a helper function which applies a given migration file without history.
func (c *ApplyCommand) applyWithoutHistory(filename string) error {
fr, err := NewFileRunner(filename, c.config, c.Option)
Expand Down
4 changes: 2 additions & 2 deletions command/history_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (r *HistoryRunner) planDir(ctx context.Context) error {
return nil
}

// Apply applis migrations and save them to history.
// Apply applies migrations and save them to history.
// If a filename is set, run a single migration.
// If not set, run all unapplied migrations.
func (r *HistoryRunner) Apply(ctx context.Context) (err error) {
Expand Down Expand Up @@ -157,7 +157,7 @@ func (r *HistoryRunner) applyFile(ctx context.Context, filename string) error {
return nil
}

// applyDir appies all unapplied migrations.
// applyDir applies all unapplied migrations.
func (r *HistoryRunner) applyDir(ctx context.Context) (err error) {
unapplied := r.hc.UnappliedMigrations()

Expand Down
3 changes: 1 addition & 2 deletions command/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ type Meta struct {
// a global configuration for tfmigrate.
config *config.TfmigrateConfig

// Option customizes a behaviror of Migrator.
// Option customizes a behavior of Migrator.
// It is used for shared settings across Migrator instances.
// TODO: Merge option into config
Option *tfmigrate.MigratorOption
}

Expand Down
4 changes: 2 additions & 2 deletions history/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type FileHeader struct {
Version int `json:"version"`
}

// ParseHistoryFile parses bytes and reteurns a History instance.
// ParseHistoryFile parses bytes and returns a History instance.
func ParseHistoryFile(b []byte) (*History, error) {
version, err := detectHistoryFileVersion(b)
if err != nil {
Expand All @@ -27,7 +27,7 @@ func ParseHistoryFile(b []byte) (*History, error) {
}
}

// detectHistoryFileVersion detects a file formart version.
// detectHistoryFileVersion detects a file format version.
func detectHistoryFileVersion(b []byte) (int, error) {
// peek a file header
var header FileHeader
Expand Down
2 changes: 1 addition & 1 deletion history/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package history

import "context"

// Storage is an abstruction layer for migration history data store.
// Storage is an abstraction layer for migration history data store.
// As you know, this is the equivalent of Terraform's backend, but we have
// implemented it by ourselves not to depend on Terraform internals directly.
// To support multiple cloud storages, write and read operations are limited to
Expand Down
2 changes: 1 addition & 1 deletion history/storage_s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type S3Client interface {
GetObjectWithContext(ctx aws.Context, input *s3.GetObjectInput, opts ...request.Option) (*s3.GetObjectOutput, error)
}

// s3Client is a real implemention of S3Client.
// s3Client is a real implementation of the S3Client.
type s3Client struct {
s3api s3iface.S3API
}
Expand Down

0 comments on commit 0743349

Please sign in to comment.