@@ -2,9 +2,9 @@ package prelude
2
2
3
3
import (
4
4
_ "embed"
5
- "log"
6
5
7
6
"github.com/evanw/esbuild/pkg/api"
7
+ log "github.com/sirupsen/logrus"
8
8
)
9
9
10
10
// Prelude is the GopherJS JavaScript interop layer.
@@ -36,13 +36,13 @@ func Minified() string {
36
36
LegalComments : api .LegalCommentsEndOfFile ,
37
37
})
38
38
for _ , w := range result .Warnings {
39
- log .Printf ( "WARNING %d:%d: %s\n %s\n " , w .Location .Line , w .Location .Column , w .Text , w .Location .LineText )
39
+ log .Warnf ( " %d:%d: %s\n %s\n " , w .Location .Line , w .Location .Column , w .Text , w .Location .LineText )
40
40
}
41
41
if errCount := len (result .Errors ); errCount > 0 {
42
42
for _ , e := range result .Errors {
43
- log .Printf ( "ERROR %d:%d: %s\n %s\n " , e .Location .Line , e .Location .Column , e .Text , e .Location .LineText )
43
+ log .Errorf ( " %d:%d: %s\n %s\n " , e .Location .Line , e .Location .Column , e .Text , e .Location .LineText )
44
44
}
45
- log .Fatalf ("JS minification failed with %d errors" , errCount )
45
+ log .Fatalf ("Prelude minification failed with %d errors" , errCount )
46
46
}
47
47
return string (result .Code )
48
48
0 commit comments