Skip to content

Commit

Permalink
remove deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
xorpaul committed Jan 25, 2024
1 parent fca2e30 commit 9582110
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,8 @@ func matchGitRemoteURLNoProxy(url string) bool {
noProxy := os.Getenv("NO_PROXY")
for _, np := range strings.Split(noProxy, ",") {
if len(np) > 0 {
Debugf("found NO_PROXY setting: " + np)
if strings.Contains(url, np) {
// fmt.Println("found matching", np, "for", url)
Debugf("found NO_PROXY setting: " + np + " matching " + url)
return true
}
}
Expand All @@ -371,7 +370,7 @@ func matchGitRemoteURLNoProxy(url string) bool {
for _, np := range strings.Split(noProxyL, ",") {
if len(np) > 0 {
if strings.Contains(url, np) {
// fmt.Println("found matching", np, "for", url)
Debugf("found no_proxy setting: " + np + " matching " + url)
return true
}
}
Expand Down
5 changes: 2 additions & 3 deletions puppetfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"regexp"
Expand Down Expand Up @@ -317,10 +316,10 @@ func resolvePuppetfile(allPuppetfiles map[string]Puppetfile) {

for _, moduleDir := range pf.moduleDirs {
moduleDir = normalizeDir(filepath.Join(pf.workDir, moduleDir))
exisitingModuleDirsFI, _ := ioutil.ReadDir(moduleDir)
exisitingModuleDirsFI, _ := os.ReadDir(moduleDir)
mutex.Lock()
for _, exisitingModuleDir := range exisitingModuleDirsFI {
//fmt.Println("adding dir: ", moduleDir+exisitingModuleDir.Name())
// fmt.Println("adding dir: ", filepath.Join(moduleDir, exisitingModuleDir.Name()))
exisitingModuleDirs[filepath.Join(moduleDir, exisitingModuleDir.Name())] = empty
}
mutex.Unlock()
Expand Down

0 comments on commit 9582110

Please sign in to comment.