logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

before-handler - (service-processing)

Description

Every Golf request goes through a request dispatcher (see request()), which is auto-generated. In order to specify your code to execute before a request is handled, create source file "before-handler.golf" and implement code that starts with "before-handler" and ends with "end-before-handler", which will be automatically picked up and compiled with your application. If no request executes (for example if your application does not handle a given request), before-handler handler does not execute either.

Examples

Here is a simple implementation of before-handler handler that just outputs "Getting Started!!": before-handler @Getting Started!! end-before-handler

Name

before-handler - (service-processing)

Purpose

Execute your code before a request is handled.

See Also

Service processing after-handlerbefore-handlerbegin-handlercall-handler See all documentation $DATE $VERSION GOLF(2gg)

Syntax

before-handler ... end-before-handler

See Also