(w http.ResponseWriter, r *http.Request)
| 361 | } |
| 362 | |
| 363 | func (a *APIController) RunnerInstallScriptHandler(w http.ResponseWriter, r *http.Request) { |
| 364 | ctx := r.Context() |
| 365 | |
| 366 | installScript, err := a.r.GetRunnerInstallScript(ctx) |
| 367 | if err != nil { |
| 368 | slog.InfoContext(ctx, "failed to get runner install template", "error", err) |
| 369 | handleError(ctx, w, err) |
| 370 | return |
| 371 | } |
| 372 | |
| 373 | w.Header().Set("Content-Type", "text/plain") |
| 374 | w.WriteHeader(http.StatusOK) |
| 375 | if _, err := w.Write(installScript); err != nil { //nolint:gosec // G705 - server-generated script, not user input |
| 376 | slog.With(slog.Any("error", err)).ErrorContext(ctx, "failed to encode response") |
| 377 | } |
| 378 | } |
nothing calls this directly
no test coverage detected