forked from helmutkemper/iotmaker.docker.builder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfuncContainerFindIdByName.go
More file actions
49 lines (45 loc) · 984 Bytes
/
Copy pathfuncContainerFindIdByName.go
File metadata and controls
49 lines (45 loc) · 984 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package iotmakerdockerbuilder
import (
iotmakerdocker "github.com/helmutkemper/iotmaker.docker/v1.0.1"
"github.com/helmutkemper/util"
)
// ContainerFindIdByName
//
// Similar:
//
// ContainerFindIdByName(), ContainerFindIdByNameContains()
//
// English:
//
// Searches and returns the ID of the container, if it exists
//
// Input:
// name: Full name of the container.
//
// Output:
// id: container ID
// err: standard error object
//
// Português:
//
// Procura e retorna o ID do container, caso o mesmo exista
//
// Entrada:
// name: Nome completo do container.
//
// Saída:
// id: ID do container
// err: Objeto de erro padrão
func (e *ContainerBuilder) ContainerFindIdByName(name string) (id string, err error) {
e.dockerSys = iotmakerdocker.DockerSystem{}
err = e.dockerSys.Init()
if err != nil {
util.TraceToLog()
return
}
id, err = e.dockerSys.ContainerFindIdByName(name)
if err != nil {
util.TraceToLog()
}
return
}