1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/graph/tag.go
Antonio Murdaca c79b9bab54 Remove engine.Status and replace it with standard go error
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-25 22:32:08 +01:00

18 lines
375 B
Go

package graph
import (
"fmt"
"github.com/docker/docker/engine"
)
func (s *TagStore) CmdTag(job *engine.Job) error {
if len(job.Args) != 2 && len(job.Args) != 3 {
return fmt.Errorf("Usage: %s IMAGE REPOSITORY [TAG]\n", job.Name)
}
var tag string
if len(job.Args) == 3 {
tag = job.Args[2]
}
return s.Set(job.Args[1], tag, job.Args[0], job.GetenvBool("force"))
}