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 124b302 commit 6ae50bdCopy full SHA for 6ae50bd
testdata/testfuncgo.go
@@ -2,8 +2,10 @@
2
package function
3
4
import (
5
+ "fmt"
6
"io/ioutil"
7
"net/http"
8
+ "os"
9
)
10
11
// HTTP is a simple HTTP function that writes the request body to the response body.
@@ -13,6 +15,11 @@ func HTTP(w http.ResponseWriter, r *http.Request) {
13
15
w.WriteHeader(http.StatusInternalServerError)
14
16
return
17
}
18
+ if curr_dir, err := os.Getwd(); err != nil {
19
+ fmt.Printf("Failed to get working directory: %s", err)
20
+ } else {
21
+ fmt.Printf("Writing output json to: %s", curr_dir)
22
+ }
23
if err := ioutil.WriteFile("function_output.json", body, 0644); err != nil {
24
25
0 commit comments