Skip to content

Commit fa3b6ef

Browse files
committed
Format code
1 parent cb37ab9 commit fa3b6ef

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
.PHONY: dev
22

3+
format:
4+
go fmt -v ./...
5+
36
linux:
47
GOOS=linux GOARCH=amd64 go build -o inotify-proxy inotify-proxy.go
58

69
test:
710
GOOS=linux GOARCH=amd64 go test -v ./...
811

9-
all: linux
12+
all: format test linux

internal/profile/types.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ func (l *Profile) IsAllowedFileExtension(extension string) bool {
1414
return false
1515
}
1616

17-
var Magento2ThemeProfile = Profile{
18-
fileExtensions: []string{ ".css", ".js", ".less", ".sass", ".ts" },
17+
var Magento2Theme = Profile{
18+
fileExtensions: []string{".css", ".js", ".less", ".sass", ".ts"},
1919
}
2020

21-
var Magento2Profile = Profile{
22-
fileExtensions: []string{ ".css", ".html", ".less", ".sass", ".js", ".php", ".phtml", ".ts", ".xml" },
21+
var Magento2 = Profile{
22+
fileExtensions: []string{".css", ".html", ".less", ".sass", ".js", ".php", ".phtml", ".ts", ".xml"},
2323
}
2424

25-
var VueStorefrontProfile = Profile{
26-
fileExtensions: []string{ ".css", ".js", ".sass", ".ts" },
25+
var VueStorefront = Profile{
26+
fileExtensions: []string{".css", ".js", ".sass", ".ts"},
2727
}

internal/profile/validator/path.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ func IsPathValid(path string, selectedProfile string) bool {
2222

2323
switch selectedProfile {
2424
case "magento2":
25-
return profile.Magento2Profile.IsAllowedFileExtension(fileExtension)
25+
return profile.Magento2.IsAllowedFileExtension(fileExtension)
2626
case "magento2-theme":
27-
return profile.Magento2ThemeProfile.IsAllowedFileExtension(fileExtension)
27+
return profile.Magento2Theme.IsAllowedFileExtension(fileExtension)
2828
case "vue-storefront":
29-
return profile.VueStorefrontProfile.IsAllowedFileExtension(fileExtension)
29+
return profile.VueStorefront.IsAllowedFileExtension(fileExtension)
3030
default:
3131
return true
3232
}

internal/watcher/walker.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ func isFileChanged(path string, fileInfo os.FileInfo) bool {
6464
return changed
6565
}
6666

67-
6867
func visit(path string, fileInfo os.FileInfo, err error) error {
6968

7069
if err != nil {
@@ -82,4 +81,4 @@ func visit(path string, fileInfo os.FileInfo, err error) error {
8281
}
8382

8483
return nil
85-
}
84+
}

0 commit comments

Comments
 (0)