Created
January 24, 2022 16:12
-
-
Save h1z3y3/5071ade541d011e5d608a3415cfc343f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package function | |
import "strings" | |
// An input schema | |
#Input: { | |
count: int | |
msg: string | |
} | |
// An output schema | |
#Output: { | |
val: string | |
} | |
#Transform: { | |
// Input for the caller | |
X1="in": #Input | |
// output for the caller | |
out: #Output | |
// intermediate fields | |
_upper: strings.ToUpper(X1.msg) | |
_msg: strings.Join([_upper]*X1.count, " ") | |
// set output | |
out: val: _msg | |
} | |
// Call transform | |
result: #Transform & {in: {msg: "ra", count: 3}} | |
// | |
// cue export function.cue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment