@@ -88,7 +88,7 @@ var goalSourceAri string
88
88
// Goal functions implemented in Go
89
89
90
90
// Implements Goal's help monad + Ari's help dyad.
91
- func VFGoalHelp (help Help ) func (_ * goal.Context , args []goal.V ) goal.V {
91
+ func vfGoalHelp (help Help ) func (_ * goal.Context , args []goal.V ) goal.V {
92
92
return func (_ * goal.Context , args []goal.V ) goal.V {
93
93
switch len (args ) {
94
94
case monadic :
@@ -168,60 +168,61 @@ func goalRegisterUniversalVariadics(ariContext *Context, goalContext *goal.Conte
168
168
goalContext .RegisterExtension ("ari" , AriVersion )
169
169
goalContext .AssignGlobal ("ari.c" , goal .NewI (0 ))
170
170
// Monads
171
- goalContext .RegisterMonad ("ratelimit.new" , VFRateLimitNew )
172
- goalContext .RegisterMonad ("ratelimit.take" , VFRateLimitTake )
173
- goalContext .RegisterMonad ("time.day" , VFTimeDay )
174
- goalContext .RegisterMonad ("time.hour" , VFTimeHour )
175
- goalContext .RegisterMonad ("time.loadlocation" , VFTimeLoadLocation )
176
- goalContext .RegisterMonad ("time.location" , VFTimeLocation )
177
- goalContext .RegisterMonad ("time.locationstring" , VFTimeLocationString )
178
- goalContext .RegisterMonad ("time.microsecond" , VFTimeMicrosecond )
179
- goalContext .RegisterMonad ("time.millisecond" , VFTimeMillisecond )
180
- goalContext .RegisterMonad ("time.minute" , VFTimeMinute )
181
- goalContext .RegisterMonad ("time.month" , VFTimeMonth )
182
- goalContext .RegisterMonad ("time.now" , VFTimeNow )
183
- goalContext .RegisterMonad ("time.nanosecond" , VFTimeNanosecond )
184
- goalContext .RegisterMonad ("time.second" , VFTimeSecond )
185
- goalContext .RegisterMonad ("time.unix" , VFTimeUnix )
186
- goalContext .RegisterMonad ("time.unixmicro" , VFTimeUnixMicro )
187
- goalContext .RegisterMonad ("time.unixmilli" , VFTimeUnixMilli )
188
- goalContext .RegisterMonad ("time.unixnano" , VFTimeUnixNano )
189
- goalContext .RegisterMonad ("time.utc" , VFTimeUTC )
190
- goalContext .RegisterMonad ("time.weekday" , VFTimeWeekDay )
191
- goalContext .RegisterMonad ("time.year" , VFTimeYear )
192
- goalContext .RegisterMonad ("time.yearday" , VFTimeYearDay )
193
- goalContext .RegisterMonad ("time.zonename" , VFTimeZoneName )
194
- goalContext .RegisterMonad ("time.zoneoffset" , VFTimeZoneOffset )
195
- goalContext .RegisterMonad ("url.encode" , VFUrlEncode )
171
+ goalContext .RegisterMonad ("ratelimit.new" , vfRateLimitNew )
172
+ goalContext .RegisterMonad ("ratelimit.take" , vfRateLimitTake )
173
+ goalContext .RegisterMonad ("time.day" , vfTimeDay )
174
+ goalContext .RegisterMonad ("time.hour" , vfTimeHour )
175
+ goalContext .RegisterMonad ("time.loadlocation" , vfTimeLoadLocation )
176
+ goalContext .RegisterMonad ("time.location" , vfTimeLocation )
177
+ goalContext .RegisterMonad ("time.locationstring" , vfTimeLocationString )
178
+ goalContext .RegisterMonad ("time.microsecond" , vfTimeMicrosecond )
179
+ goalContext .RegisterMonad ("time.millisecond" , vfTimeMillisecond )
180
+ goalContext .RegisterMonad ("time.minute" , vfTimeMinute )
181
+ goalContext .RegisterMonad ("time.month" , vfTimeMonth )
182
+ goalContext .RegisterMonad ("time.now" , vfTimeNow )
183
+ goalContext .RegisterMonad ("time.nanosecond" , vfTimeNanosecond )
184
+ goalContext .RegisterMonad ("time.second" , vfTimeSecond )
185
+ goalContext .RegisterMonad ("time.unix" , vfTimeUnix )
186
+ goalContext .RegisterMonad ("time.unixmicro" , vfTimeUnixMicro )
187
+ goalContext .RegisterMonad ("time.unixmilli" , vfTimeUnixMilli )
188
+ goalContext .RegisterMonad ("time.unixnano" , vfTimeUnixNano )
189
+ goalContext .RegisterMonad ("time.utc" , vfTimeUTC )
190
+ goalContext .RegisterMonad ("time.weekday" , vfTimeWeekDay )
191
+ goalContext .RegisterMonad ("time.year" , vfTimeYear )
192
+ goalContext .RegisterMonad ("time.yearday" , vfTimeYearDay )
193
+ goalContext .RegisterMonad ("time.zonename" , vfTimeZoneName )
194
+ goalContext .RegisterMonad ("time.zoneoffset" , vfTimeZoneOffset )
195
+ goalContext .RegisterMonad ("url.encode" , vfURLEncode )
196
196
// Dyads
197
- goalContext .RegisterDyad ("help" , VFGoalHelp (help ))
198
- goalContext .RegisterDyad ("http.client" , VFHTTPClientFn ())
199
- goalContext .RegisterDyad ("http.delete" , VFHTTPMaker (ariContext , "DELETE" ))
200
- goalContext .RegisterDyad ("http.get" , VFHTTPMaker (ariContext , "GET" ))
201
- goalContext .RegisterDyad ("http.head" , VFHTTPMaker (ariContext , "HEAD" ))
202
- goalContext .RegisterDyad ("http.options" , VFHTTPMaker (ariContext , "OPTIONS" ))
203
- goalContext .RegisterDyad ("http.patch" , VFHTTPMaker (ariContext , "PATCH" ))
204
- goalContext .RegisterDyad ("http.post" , VFHTTPMaker (ariContext , "POST" ))
205
- goalContext .RegisterDyad ("http.put" , VFHTTPMaker (ariContext , "PUT" ))
206
- goalContext .RegisterDyad ("time.add" , VFTimeAdd )
207
- goalContext .RegisterDyad ("time.date" , VFTimeDate )
208
- goalContext .RegisterDyad ("time.fixedzone" , VFTimeFixedZone )
209
- goalContext .RegisterDyad ("time.format" , VFTimeFormat )
210
- goalContext .RegisterDyad ("time.parse" , VFTimeParse )
211
- goalContext .RegisterDyad ("time.sub" , VFTimeSub )
197
+ goalContext .RegisterDyad ("help" , vfGoalHelp (help ))
198
+ goalContext .RegisterDyad ("http.client" , vfHTTPClientFn ())
199
+ goalContext .RegisterDyad ("http.delete" , vfHTTPMaker (ariContext , "DELETE" ))
200
+ goalContext .RegisterDyad ("http.get" , vfHTTPMaker (ariContext , "GET" ))
201
+ goalContext .RegisterDyad ("http.head" , vfHTTPMaker (ariContext , "HEAD" ))
202
+ goalContext .RegisterDyad ("http.options" , vfHTTPMaker (ariContext , "OPTIONS" ))
203
+ goalContext .RegisterDyad ("http.patch" , vfHTTPMaker (ariContext , "PATCH" ))
204
+ goalContext .RegisterDyad ("http.post" , vfHTTPMaker (ariContext , "POST" ))
205
+ goalContext .RegisterDyad ("http.put" , vfHTTPMaker (ariContext , "PUT" ))
206
+ goalContext .RegisterDyad ("time.add" , vfTimeAdd )
207
+ goalContext .RegisterDyad ("time.addDate" , vfTimeAddDate )
208
+ goalContext .RegisterDyad ("time.date" , vfTimeDate )
209
+ goalContext .RegisterDyad ("time.fixedZone" , vfTimeFixedZone )
210
+ goalContext .RegisterDyad ("time.format" , vfTimeFormat )
211
+ goalContext .RegisterDyad ("time.parse" , vfTimeParse )
212
+ goalContext .RegisterDyad ("time.sub" , vfTimeSub )
212
213
// Globals
213
214
registerTimeGlobals (goalContext )
214
215
}
215
216
216
217
func goalRegisterVariadics (ariContext * Context , goalContext * goal.Context , help Help , sqlDatabase * SQLDatabase ) {
217
218
goalRegisterUniversalVariadics (ariContext , goalContext , help )
218
219
// Monads
219
- goalContext .RegisterMonad ("sql.close" , VFSqlClose )
220
- goalContext .RegisterMonad ("sql.open" , VFSqlOpen )
220
+ goalContext .RegisterMonad ("sql.close" , vfSQLClose )
221
+ goalContext .RegisterMonad ("sql.open" , vfSQLOpen )
221
222
// Dyads
222
- goalContext .RegisterDyad ("http.serve" , VFServe )
223
- goalContext .RegisterDyad ("sql.q" , VFSqlQFn (sqlDatabase ))
224
- goalContext .RegisterDyad ("sql.exec" , VFSqlExecFn (sqlDatabase ))
223
+ goalContext .RegisterDyad ("http.serve" , vfServe )
224
+ goalContext .RegisterDyad ("sql.q" , vfSQLQFn (sqlDatabase ))
225
+ goalContext .RegisterDyad ("sql.exec" , vfSQLExecFn (sqlDatabase ))
225
226
}
226
227
227
228
//nolint:funlen
0 commit comments