We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2e89fd commit 46b4379Copy full SHA for 46b4379
polycode/cli.go
@@ -3,13 +3,14 @@ package polycode
3
import (
4
"encoding/json"
5
"fmt"
6
+ "os"
7
)
8
9
func runCliCommand(args []string) error {
10
switch args[0] {
11
case "info":
12
{
- return getAppInfo()
13
+ return getAppInfo(args[1])
14
}
15
default:
16
@@ -18,7 +19,7 @@ func runCliCommand(args []string) error {
18
19
20
21
-func getAppInfo() error {
22
+func getAppInfo(filePath string) error {
23
var services []ServiceData
24
for name := range serviceMap {
25
services = append(services, ServiceData{
@@ -37,6 +38,10 @@ func getAppInfo() error {
37
38
return err
39
40
- println(string(output))
41
+ err = os.WriteFile(filePath, output, 0644)
42
+ if err != nil {
43
+ return err
44
+ }
45
+
46
return nil
47
0 commit comments