Skip to content

Commit 4eea43f

Browse files
committed
docs: env template file in place of placeholder
1 parent ffb8da7 commit 4eea43f

5 files changed

Lines changed: 10 additions & 11 deletions

File tree

cmd/env/env.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func NewCommand(clients *shared.ClientFactory) *cobra.Command {
4949
}, "\n"),
5050
Example: style.ExampleCommandsf([]style.ExampleCommand{
5151
{
52-
Meaning: "Initialize environment variables from template placeholders",
52+
Meaning: "Initialize environment variables from a template file",
5353
Command: "env init",
5454
},
5555
{

cmd/env/env_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func Test_Env_Command(t *testing.T) {
3232
testutil.TableTestCommand(t, testutil.CommandTests{
3333
"shows the help page without commands or arguments or flags": {
3434
ExpectedStdoutOutputs: []string{
35-
"Initialize environment variables from placeholders",
35+
"Initialize environment variables from a template file",
3636
"Set an environment variable",
3737
"List all environment variables",
3838
"Unset an environment variable",

cmd/env/init.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ import (
3232
func NewEnvInitCommand(clients *shared.ClientFactory) *cobra.Command {
3333
cmd := &cobra.Command{
3434
Use: "init",
35-
Short: "Initialize environment variables from placeholders",
35+
Short: "Initialize environment variables from a template file",
3636
Long: strings.Join([]string{
37-
`Initialize the project ".env" file by copying from a template placeholder file.`,
37+
`Initialize the project ".env" file by copying from an ".env" template file.`,
3838
"",
3939
`Copies content from either the ".env.sample" or ".env.example" file to the`,
4040
`project ".env" file if those project environment variables don't already exist.`,
@@ -43,7 +43,7 @@ func NewEnvInitCommand(clients *shared.ClientFactory) *cobra.Command {
4343
}, "\n"),
4444
Example: style.ExampleCommandsf([]style.ExampleCommand{
4545
{
46-
Meaning: "Initialize environment variables from template placeholders",
46+
Meaning: "Initialize environment variables from a template file",
4747
Command: "env init",
4848
},
4949
}),
@@ -108,7 +108,7 @@ func runEnvInitCommandFunc(clients *shared.ClientFactory, cmd *cobra.Command) er
108108
Emoji: "evergreen_tree",
109109
Text: "Environment Initialize",
110110
Secondary: []string{
111-
`No template placeholder was found for environment variables in this project`,
111+
`No ".env" template file was found for environment variables in this project`,
112112
fmt.Sprintf("Set environment variables with %s", style.Commandf("env set", false)),
113113
},
114114
}))
@@ -123,7 +123,7 @@ func runEnvInitCommandFunc(clients *shared.ClientFactory, cmd *cobra.Command) er
123123
Emoji: "evergreen_tree",
124124
Text: "Environment Initialize",
125125
Secondary: []string{
126-
fmt.Sprintf(`Placeholders were copied from "%s" to a project ".env" file`, source),
126+
fmt.Sprintf(`Environment variables were copied from "%s" to a project ".env" file`, source),
127127
`This new ".env" file shouldn't be added to version control`,
128128
},
129129
}))

internal/slackdotenv/slackdotenv.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ import (
2929
"github.com/spf13/afero"
3030
)
3131

32-
// Init copies a template placeholder file (.env.sample or .env.example) to
33-
// .env. It returns an error if .env already exists, or if no placeholder file
34-
// is found.
32+
// Init copies an .env template file (.env.sample or .env.example) to .env. It
33+
// returns an error if .env already exists, or if no template file is found.
3534
func Init(fs afero.Fs) (string, error) {
3635
sampleFiles := []string{".env.sample", ".env.example"}
3736

internal/slackerror/errors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ Otherwise start your app for local development with: %s`,
713713

714714
ErrDotEnvPlaceholderNotFound: {
715715
Code: ErrDotEnvPlaceholderNotFound,
716-
Message: "No template placeholder was found for environment variables",
716+
Message: "No .env template file was found for environment variables",
717717
},
718718

719719
ErrDotEnvVarMarshal: {

0 commit comments

Comments
 (0)