Skip to content

Commit

Permalink
Remove go.mod and go.sum
Browse files Browse the repository at this point in the history
Remove ioutil.ReadFile in favor of os.ReadFile.
Remove MkdirAll in favor of Mkdir.
  • Loading branch information
dimitardimitrov13 committed Jul 25, 2024
1 parent 50160aa commit 2f5337e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 1,808 deletions.
4 changes: 2 additions & 2 deletions depot/containerstore/service_binding_root_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func NewServiceBindingRootHandler(

func (h *ServiceBindingRootHandler) CreateDir(logger lager.Logger, container executor.Container) ([]garden.BindMount, error) {
containerDir := filepath.Join(h.bindingRootPath, container.Guid)
err := os.MkdirAll(containerDir, 0755)
err := os.Mkdir(containerDir, 0755)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -82,7 +82,7 @@ func (h *ServiceBindingRootHandler) createBindingRootsForServices(

dirName = filepath.Join(containerDir, dirName)

err := os.MkdirAll(dirName, 0755)
err := os.Mkdir(dirName, 0755)
if err != nil {
logger.Error("failed-to-create-directory", err, lager.Data{"dirName": dirName})
return fmt.Errorf("failed to create directory %s: %w", dirName, err)
Expand Down
3 changes: 1 addition & 2 deletions depot/containerstore/service_binding_root_handler_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package containerstore_test

import (
"io/ioutil"
"os"
"path/filepath"

Expand Down Expand Up @@ -74,7 +73,7 @@ var _ = Describe("Service Binding Root Handler", func() {
usernameFilePath := filepath.Join(tmpdir, fakeContainerUUID, "redis", "username")
Expect(usernameFilePath).To(BeAnExistingFile())

content, err := ioutil.ReadFile(usernameFilePath)
content, err := os.ReadFile(usernameFilePath)
Expect(err).NotTo(HaveOccurred())
Expect(string(content)).To(Equal("username"))
})
Expand Down
68 changes: 0 additions & 68 deletions go.mod

This file was deleted.

Loading

0 comments on commit 2f5337e

Please sign in to comment.