mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-11 01:42:15 +01:00
minor refactoring of const + better timeout handling in pinter package + api package tests
This commit is contained in:
@@ -35,7 +35,7 @@ const (
|
||||
)
|
||||
|
||||
func convert(ctx *context.Context, p printer.Printer) error {
|
||||
const op = "handler.convert"
|
||||
const op string = "handler.convert"
|
||||
r := ctx.Resource()
|
||||
logger := ctx.StandardLogger()
|
||||
baseFilename := random.Get()
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
// HTML is the endpoint for converting
|
||||
// HTML to PDF.
|
||||
func HTML(c echo.Context) error {
|
||||
const op = "handler.HTML"
|
||||
const op string = "handler.HTML"
|
||||
ctx := context.MustCastFromEchoContext(c)
|
||||
ctx.StandardLogger().DebugfOp(op, "html request")
|
||||
r := ctx.Resource()
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
// Markdown is the endpoint for converting
|
||||
// Markdown to PDF.
|
||||
func Markdown(c echo.Context) error {
|
||||
const op = "handler.Markdown"
|
||||
const op string = "handler.Markdown"
|
||||
ctx := context.MustCastFromEchoContext(c)
|
||||
ctx.StandardLogger().DebugfOp(op, "markdown request")
|
||||
r := ctx.Resource()
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
// Merge is the endpoint for
|
||||
// merging PDF files.
|
||||
func Merge(c echo.Context) error {
|
||||
const op = "handler.Merge"
|
||||
const op string = "handler.Merge"
|
||||
ctx := context.MustCastFromEchoContext(c)
|
||||
ctx.StandardLogger().DebugfOp(op, "merge request")
|
||||
r := ctx.Resource()
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
// Office is the endpoint for converting
|
||||
// Office files to PDF.
|
||||
func Office(c echo.Context) error {
|
||||
const op = "handler.Office"
|
||||
const op string = "handler.Office"
|
||||
ctx := context.MustCastFromEchoContext(c)
|
||||
ctx.StandardLogger().DebugfOp(op, "office request")
|
||||
r := ctx.Resource()
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
// URL is the endpoint for converting
|
||||
// a URL to PDF.
|
||||
func URL(c echo.Context) error {
|
||||
const op = "handler.URL"
|
||||
const op string = "handler.URL"
|
||||
ctx := context.MustCastFromEchoContext(c)
|
||||
ctx.StandardLogger().DebugfOp(op, "url request")
|
||||
r := ctx.Resource()
|
||||
|
||||
Reference in New Issue
Block a user