Skip to content

Commit 0859208

Browse files
committed
- Adding the business layer
1 parent bcd9d56 commit 0859208

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

‎pkg/script_response.go‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,14 @@ import (
99

1010
const replyFile = "reply.json"
1111

12-
func Reply(data interface{}) error {
13-
pwd, err := os.Getwd()
14-
if err != nil {
15-
return err
16-
}
12+
func Reply(projectPath string, data interface{}) error {
1713

1814
bytes, err := json.Marshal(data)
1915
if err != nil {
2016
return err
2117
}
2218

23-
destPath := filepath.Join(pwd, replyFile)
19+
destPath := filepath.Join(projectPath, replyFile)
2420
if err = ioutil.WriteFile(destPath, bytes, os.ModePerm); err != nil {
2521
return err
2622
}

0 commit comments

Comments
 (0)
⌂ 换网址