Skip to content

Commit eadd0cd

Browse files
authored
Make use of instructions defined in extensions API for function_init (#2596) (#2597)
1 parent f69c59c commit eadd0cd

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

internal/extensions/actions/function_init.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ import (
1717
)
1818

1919
type functionInitActionConfig struct {
20-
UseRuntime string `yaml:"useRuntime"`
21-
OutputDir string `yaml:"outputDir"`
22-
Runtimes map[string]runtimeConfig `yaml:"runtimes"`
20+
UseRuntime string `yaml:"useRuntime"`
21+
OutputDir string `yaml:"outputDir"`
22+
Runtimes map[string]runtimeConfig `yaml:"runtimes"`
23+
NextStepsInstructions string `yaml:"nextStepsInstructions"`
2324
}
2425

2526
type runtimeConfig struct {
@@ -103,10 +104,7 @@ func (fi *functionInitAction) Run(cmd *cobra.Command, _ []string) clierror.Error
103104

104105
out := cmd.OutOrStdout()
105106
fmt.Fprintf(out, "Functions files of runtime %s initialized to dir %s\n", fi.Cfg.UseRuntime, outDir)
106-
fmt.Fprint(out, "\nNext steps:\n")
107-
fmt.Fprint(out, "* update output files in your favorite IDE\n")
108-
fmt.Fprintf(out, "* create Function, for example:\n")
109-
fmt.Fprintf(out, " kyma function create %s --runtime %s --source %s --dependencies %s\n", fi.Cfg.UseRuntime, fi.Cfg.UseRuntime, handlerPath, depsPath)
107+
fmt.Fprintf(out, "\n%s\n", fi.Cfg.NextStepsInstructions)
110108
return nil
111109
}
112110

0 commit comments

Comments
 (0)