GOLF(2gg)

πŸ“¦ version 601.4.41, in ubuntu questing

πŸ’– GOLF(2gg) πŸ’–

okay bestie, welcome to the GOLF(2gg) manual page, this is the Development corner of the docs and honestly? it's giving iconic. sit down, hydrate, let's talk about set-param 🫢


✨ NAME ✨

set-param β€” (request-data)

πŸŽ€ PURPOSE πŸŽ€

Set or create a parameter. that's it. that's the whole job. slay πŸ’…

🌸 SYNTAX 🌸

set-param ( <name> [ = <value> ] ) , ...

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so set-param sets or creates the parameter <name> β€” and if you wanna peek at the sibling that reads them back, go see get-param. πŸ‘€

Here's the vibe: if the parameter <name> doesn't exist yet, it gets created with <value>. If it does exist, its value just gets replaced with <value>. and no cap, <value> can literally be any type. any. type. πŸ’€

Now here's the cute part ✨ β€” if you leave out the equal sign ("=") and the <value>, then <value> is the same as <name>. so this:

set-param something

is literally the same as:

set-param something = something

where the first something is the parameter you're setting/creating, and the second something is an actual variable in your code. in this example the two just happen to have the same name β€” that's a coincidence of the example, not a rule! but honestly this happens so often that this little form is just a shortcut for it. iykyk 😌

and yes, you can specify any number of parameters separated by a comma. for instance, in this case par1 is a boolean, par2 is a number, and par3 is a string:

set-number par2 = 10
set-param par1=true, par, par3="hi"

look at that comma-separated moment. we love a multi-param queen πŸ‘‘

🌈 EXAMPLES 🌈

Set the value of parameter "quantity" to "10" β€” which is also the output, bestie, so watch it come back around:

set-param quantity = "10"
...
get-param quantity
print-out quantity

⭐ SEE ALSO ⭐

  • Request data
  • get-param
  • request-body
  • set-param
  • See all documentation

no warnings, no deprecated nonsense, no bugs to scream about in this one β€” just pure parameter-setting main character energy πŸ‘‘

okay that's the whole page fr fr πŸ’– this was the GOLF(2gg) manual, version $VERSION, dated $DATE β€” go forth and set those params, you absolute legend πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from