mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-11 04:32:29 +02:00
Fix typos and linter warnings
This commit is contained in:
@@ -435,17 +435,17 @@ func init() {
|
|||||||
if conf.DownloadBufferSize < 0 {
|
if conf.DownloadBufferSize < 0 {
|
||||||
logFatal("Download buffer size should be greater than or equal to 0")
|
logFatal("Download buffer size should be greater than or equal to 0")
|
||||||
} else if conf.DownloadBufferSize > int(^uint32(0)) {
|
} else if conf.DownloadBufferSize > int(^uint32(0)) {
|
||||||
logFatal("Download buffer size can't be creater than %d", ^uint32(0))
|
logFatal("Download buffer size can't be greater than %d", ^uint32(0))
|
||||||
}
|
}
|
||||||
|
|
||||||
if conf.GZipBufferSize < 0 {
|
if conf.GZipBufferSize < 0 {
|
||||||
logFatal("GZip buffer size should be greater than or equal to 0")
|
logFatal("GZip buffer size should be greater than or equal to 0")
|
||||||
} else if conf.GZipBufferSize > int(^uint32(0)) {
|
} else if conf.GZipBufferSize > int(^uint32(0)) {
|
||||||
logFatal("GZip buffer size can't be creater than %d", ^uint32(0))
|
logFatal("GZip buffer size can't be greater than %d", ^uint32(0))
|
||||||
}
|
}
|
||||||
|
|
||||||
if conf.BufferPoolCalibrationThreshold < 64 {
|
if conf.BufferPoolCalibrationThreshold < 64 {
|
||||||
logFatal("Buffer pool calibration threshhold should be greater than or equal to 64")
|
logFatal("Buffer pool calibration threshold should be greater than or equal to 64")
|
||||||
}
|
}
|
||||||
|
|
||||||
initNewrelic()
|
initNewrelic()
|
||||||
|
@@ -426,11 +426,7 @@ func transformImage(ctx context.Context, img **C.struct__VipsImage, data []byte,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = vipsFixColourspace(img); err != nil {
|
return vipsFixColourspace(img)
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func transformGif(ctx context.Context, img **C.struct__VipsImage, po *processingOptions) error {
|
func transformGif(ctx context.Context, img **C.struct__VipsImage, po *processingOptions) error {
|
||||||
|
@@ -33,7 +33,7 @@ func initPrometheus() {
|
|||||||
|
|
||||||
prometheusErrorsTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
|
prometheusErrorsTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||||
Name: "errors_total",
|
Name: "errors_total",
|
||||||
Help: "A counter of the occured errors separated by type.",
|
Help: "A counter of the occurred errors separated by type.",
|
||||||
}, []string{"type"})
|
}, []string{"type"})
|
||||||
|
|
||||||
prometheusRequestDuration = prometheus.NewHistogram(prometheus.HistogramOpts{
|
prometheusRequestDuration = prometheus.NewHistogram(prometheus.HistogramOpts{
|
||||||
|
Reference in New Issue
Block a user