77 "shortpaste/core/tools/file"
88 "strings"
99
10- log "github.com/sirupsen/logrus"
10+ "github.com/sirupsen/logrus"
1111)
1212
1313var replacers map [string ]Replacer = map [string ]Replacer {}
@@ -18,7 +18,7 @@ func SetReplacer(replacer Replacer) {
1818
1919func ReplaceInFiles (rootDirectory string ) {
2020 if _ , err := os .Stat (rootDirectory ); os .IsNotExist (err ) {
21- log .WithField ("category" , "placeholders" ).Warn (rootDirectory + " not found." )
21+ logrus .WithField ("category" , "placeholders" ).Warn (rootDirectory + " not found." )
2222 return
2323 }
2424
@@ -33,7 +33,7 @@ func ReplaceInFiles(rootDirectory string) {
3333 return nil
3434 })
3535 if err != nil {
36- log .WithField ("category" , "placeholders" ).Fatal (err )
36+ logrus .WithField ("category" , "placeholders" ).Fatal (err )
3737 }
3838
3939 err = filepath .Walk (rootDirectory ,
@@ -50,14 +50,14 @@ func ReplaceInFiles(rootDirectory string) {
5050 return nil
5151 })
5252 if err != nil {
53- log .WithField ("category" , "placeholders" ).Fatal (err )
53+ logrus .WithField ("category" , "placeholders" ).Fatal (err )
5454 }
5555}
5656
5757func containsPlaceHolders (path string ) bool {
5858 b , err := ioutil .ReadFile (path )
5959 if err != nil {
60- log .Fatal (err )
60+ logrus .Fatal (err )
6161 }
6262 contains := false
6363 for _ , replacer := range replacers {
@@ -70,7 +70,7 @@ func containsPlaceHolders(path string) bool {
7070func replacePlaceHolders (path string ) error {
7171 b , err := ioutil .ReadFile (path )
7272 if err != nil {
73- log .Fatal (err )
73+ logrus .Fatal (err )
7474 }
7575
7676 result := string (b )
0 commit comments