Skip to content

Commit

Permalink
formatting change
Browse files Browse the repository at this point in the history
  • Loading branch information
Matej Smycka committed Dec 12, 2024
1 parent f8b88b2 commit 3827a27
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 2 deletions.
45 changes: 45 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com

# The lines below are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/need to use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

version: 2

before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...

builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin

archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip

changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
Binary file modified build/regfinder.elf
Binary file not shown.
Binary file modified build/regfinder.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ func findRegexMatches(regex *regexp.Regexp, line string) [][]int {

func printMatches(filePath string, lineNum int, line string) {
if !*NO_COLOR {
fmt.Printf("File: %s, Line %d, Match: ", filePath, lineNum+1)
fmt.Printf("%s:%d Match: ", filePath, lineNum+1)
color.Red("%.100s", line)
} else {
fmt.Printf("File: %s, Line %d, Match: %.100s\n", filePath, lineNum+1, line)
fmt.Printf("%s:%d Match: %.100s\n", filePath, lineNum+1, line)
}
}

Expand Down

0 comments on commit 3827a27

Please sign in to comment.