Explorar o código

Merge pull request #110 from ulyssessouza/fix-typo

Fix typo (and refactor the method name)
Djordje Lukic %!s(int64=5) %!d(string=hai) anos
pai
achega
f451bb333e
Modificáronse 2 ficheiros con 6 adicións e 6 borrados
  1. 3 3
      azure/backend.go
  2. 3 3
      azure/backend_test.go

+ 3 - 3
azure/backend.go

@@ -177,7 +177,7 @@ func (cs *aciContainerService) Run(ctx context.Context, r containers.ContainerCo
 	return createACIContainers(ctx, cs.ctx, groupDefinition)
 }
 
-func getGrouNameContainername(containerID string) (groupName string, containerName string) {
+func getGroupAndContainerName(containerID string) (groupName string, containerName string) {
 	tokens := strings.Split(containerID, "_")
 	groupName = tokens[0]
 	if len(tokens) > 1 {
@@ -190,7 +190,7 @@ func getGrouNameContainername(containerID string) (groupName string, containerNa
 }
 
 func (cs *aciContainerService) Exec(ctx context.Context, name string, command string, reader io.Reader, writer io.Writer) error {
-	groupName, containerAciName := getGrouNameContainername(name)
+	groupName, containerAciName := getGroupAndContainerName(name)
 	containerExecResponse, err := execACIContainer(ctx, cs.ctx, command, groupName, containerAciName)
 	if err != nil {
 		return err
@@ -206,7 +206,7 @@ func (cs *aciContainerService) Exec(ctx context.Context, name string, command st
 }
 
 func (cs *aciContainerService) Logs(ctx context.Context, containerName string, req containers.LogsRequest) error {
-	groupName, containerAciName := getGrouNameContainername(containerName)
+	groupName, containerAciName := getGroupAndContainerName(containerName)
 	logs, err := getACIContainerLogs(ctx, cs.ctx, groupName, containerAciName)
 	if err != nil {
 		return err

+ 3 - 3
azure/backend_test.go

@@ -10,15 +10,15 @@ import (
 func TestGetContainerName(t *testing.T) {
 	RegisterTestingT(t)
 
-	group, container := getGrouNameContainername("docker1234")
+	group, container := getGroupAndContainerName("docker1234")
 	Expect(group).To(Equal("docker1234"))
 	Expect(container).To(Equal(singleContainerName))
 
-	group, container = getGrouNameContainername("compose_service1")
+	group, container = getGroupAndContainerName("compose_service1")
 	Expect(group).To(Equal("compose"))
 	Expect(container).To(Equal("service1"))
 
-	group, container = getGrouNameContainername("compose_stack_service1")
+	group, container = getGroupAndContainerName("compose_stack_service1")
 	Expect(group).To(Equal("compose_stack"))
 	Expect(container).To(Equal("service1"))
 }