Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
This commit is contained in:
Josh Soref
2021-09-20 16:54:29 +05:45
committed by Phil Davis
parent 806d224ed7
commit 55667a3ab3
87 changed files with 192 additions and 192 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ SHELL := bash
NAME := thumbnails
############ tooling ############
ifneq (, $(shell which go 2> /dev/null)) # supress `command not found warnings` for non go targets in CI
ifneq (, $(shell which go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
include ../.bingo/Variables.mk
endif
+3 -3
View File
@@ -11,12 +11,12 @@ import (
)
const (
_resolutionSeperator = "x"
_resolutionSeparator = "x"
)
// ParseResolution returns an image.Rectangle representing the resolution given as a string
func ParseResolution(s string) (image.Rectangle, error) {
parts := strings.Split(s, _resolutionSeperator)
parts := strings.Split(s, _resolutionSeparator)
if len(parts) != 2 {
return image.Rectangle{}, fmt.Errorf("failed to parse resolution: %s. Expected format <width>x<height>", s)
}
@@ -78,7 +78,7 @@ func (rs Resolutions) ClosestMatch(requested image.Rectangle, sourceSize image.R
}
// Convert diff to positive value
// Multiplying by -1 is safe since we aren't getting postive numbers here
// Multiplying by -1 is safe since we aren't getting positive numbers here
// because of the check above
absDiff := diff * -1
if absDiff < minDiff {
+2 -2
View File
@@ -45,9 +45,9 @@ If you prefer to configure the service with environment variables you can see th
If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given.
### Commandline flags
### Command-line flags
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
If you prefer to configure the service with command-line flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
{{ $options := .Options -}}
{{ range $com := .Commands }}{{ with (list $options $com) -}}