pkg/units: Remove unused named returns
Remove named returns since not used in function body. Might prevent potential subtle bugs. Docker-DCO-1.1-Signed-off-by: Francisco Carriedo <fcarriedo@gmail.com> (github: fcarriedo)
This commit is contained in:
parent
23f29beb82
commit
6f59de0294
1 changed files with 1 additions and 1 deletions
|
@ -61,7 +61,7 @@ func FromHumanSize(size string) (int64, error) {
|
||||||
// in bytes, kibibytes, mebibytes, gibibytes, or tebibytes and
|
// in bytes, kibibytes, mebibytes, gibibytes, or tebibytes and
|
||||||
// returns the number of bytes, or -1 if the string is unparseable.
|
// returns the number of bytes, or -1 if the string is unparseable.
|
||||||
// Units are case-insensitive, and the 'b' suffix is optional.
|
// Units are case-insensitive, and the 'b' suffix is optional.
|
||||||
func RAMInBytes(size string) (bytes int64, err error) {
|
func RAMInBytes(size string) (int64, error) {
|
||||||
re, error := regexp.Compile("^(\\d+)([kKmMgGtT])?[bB]?$")
|
re, error := regexp.Compile("^(\\d+)([kKmMgGtT])?[bB]?$")
|
||||||
if error != nil {
|
if error != nil {
|
||||||
return -1, error
|
return -1, error
|
||||||
|
|
Loading…
Reference in a new issue