You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Golang is a great language for small and fast scripting, would be nice to be able to use it with a dedicated plugin as it is done for python (full list)
The text was updated successfully, but these errors were encountered:
hmm tricky subject as Go-lang is not really a scripting language, right? so putting it under a script plugin just as a wrapper around Docker/Shell could be a bit misleading maybe?
Still, let's assume we would do it, what would you put under a Script task for Go? since I don't know Go, ChatGPT came up with this - is this plausible or not?
id: go_demonamespace: company.teamtasks:
- id: gotype: io.kestra.plugin.scripts.go.ScriptbeforeCommands:
- go mod init script
- go get github.com/kestra-io/kestra-go-sdk # assuming we have equivalent to kestra's pip package for Goscript: | package main import ( "fmt" "net/http" "io/ioutil" "github.com/kestra-io/kestra-go-sdk" ) func main() { resp, err := http.Get("https://kestra.io") if err != nil { fmt.Println("Error:", err) return } defer resp.Body.Close() body, _ := ioutil.ReadAll(resp.Body) fmt.Println(resp.StatusCode) kestra.Outputs(map[string]interface{}{ "status": resp.StatusCode, "text": string(body), }) }
Feature description
Golang is a great language for small and fast scripting, would be nice to be able to use it with a dedicated plugin as it is done for python (full list)
The text was updated successfully, but these errors were encountered: