MCPcopy Create free account
hub / github.com/github/gh-aw / toEngineEnvValueString

Function toEngineEnvValueString

pkg/workflow/engine.go:29–42  ·  view source on GitHub ↗
(value any)

Source from the content-addressed store, hash-verified

27}
28
29func toEngineEnvValueString(value any) (string, bool) {
30 switch v := value.(type) {
31 case string:
32 return v, true
33 case float32:
34 return strconv.FormatFloat(float64(v), 'f', -1, 32), true
35 case float64:
36 return strconv.FormatFloat(v, 'f', -1, 64), true
37 case bool, int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64:
38 return fmt.Sprintf("%v", v), true
39 default:
40 return "", false
41 }
42}
43
44// EngineConfig represents the parsed engine configuration
45type EngineConfig struct {

Callers 1

ExtractEngineConfigMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected