Compare commits

..

No commits in common. "6588bd2d45d7f95ba23bc55205d84b167a40de3a" and "dad789954ff4d46516f59e690d25faae9f4839bb" have entirely different histories.

14
main.go
View File

@ -10,6 +10,7 @@ import (
"os"
"path/filepath"
"strings"
"time"
"github.com/sethvargo/go-githubactions"
)
@ -69,9 +70,6 @@ func main() {
req.Header.Add("Content-Type", mwriter.FormDataContentType())
go func() {
defer mwriter.Close()
defer writer.Close()
err = filepath.Walk(path, func(innerPath string, info fs.FileInfo, err error) error {
if err != nil {
return err
@ -105,8 +103,18 @@ func main() {
if err != nil {
githubactions.Fatalf("Unable to create request body: %v", fmt.Errorf("%w", err))
}
if err := mwriter.Close(); err != nil {
githubactions.Fatalf("Unable to close multipart writer: %v", fmt.Errorf("%w", err))
}
if err := writer.Close(); err != nil {
githubactions.Fatalf("Unable to close writer: %v", fmt.Errorf("%w", err))
}
}()
time.Sleep(10 * time.Second)
githubactions.Infof("Calling node API")
client := &http.Client{}
res, err := client.Do(req)