Skip to content

Commit

Permalink
update deps; restructure; update aux files
Browse files Browse the repository at this point in the history
  • Loading branch information
aine-etke committed Sep 14, 2024
1 parent f5cfff1 commit cd88d30
Show file tree
Hide file tree
Showing 30 changed files with 776 additions and 79 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
liberapay: etkecc
8 changes: 1 addition & 7 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- name: add just repo
run: |
wget -qO - 'https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg 1> /dev/null
echo "deb [arch=all,$(dpkg --print-architecture) signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.makedeb.org prebuilt-mpr $(lsb_release -cs)" | sudo tee /etc/apt/sources.list.d/prebuilt-mpr.list
- uses: ConorMacBride/install-package@v1
with:
apt: just
- uses: extractions/setup-just@v1
- name: lint
uses: golangci/golangci-lint-action@v6
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/cover.out
/.env
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ linters:
- bidichk
- bodyclose
- containedctx
- copyloopvar
- decorder
- dogsled
- dupl
Expand All @@ -86,7 +87,6 @@ linters:
- errname
- errorlint
- exhaustive
- exportloopref
- forcetypeassert
- gocognit
- gocritic
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ builds:
- -extldflags "-static"
flags:
- -tags=timetzdata,goolm
main: ./cmd/
main: ./cmd/ansible-wg-sync
goos:
- linux
- windows
Expand Down
3 changes: 2 additions & 1 deletion cmd/main.go → cmd/ansible-wg-sync/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

"github.com/adrg/xdg"
"github.com/etkecc/go-ansible"
"github.com/etkecc/go-kit"

"github.com/etkecc/ansible-wg-sync/internal/config"
)
Expand Down Expand Up @@ -76,7 +77,7 @@ func getAllowedIPs(cfg *config.Config) []string {
allowedIPs = append(allowedIPs, cidr)
}
}
allowedIPs = ansible.Uniq(allowedIPs)
allowedIPs = kit.Uniq(allowedIPs)
sortIPs(allowedIPs)
return allowedIPs
}
Expand Down
File renamed without changes.
11 changes: 7 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
module github.com/etkecc/ansible-wg-sync

go 1.21
go 1.22.0

toolchain go1.23.1

require (
github.com/adrg/xdg v0.5.0
github.com/etkecc/go-ansible v0.0.0-20240808194949-0bb776cada0c
github.com/etkecc/go-ansible v0.0.0-20240909185856-90ce4b4ef3e7
github.com/etkecc/go-kit v1.0.0
gopkg.in/yaml.v3 v3.0.1
)

require (
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa // indirect
golang.org/x/sys v0.24.0 // indirect
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
golang.org/x/sys v0.25.0 // indirect
)
14 changes: 8 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ github.com/adrg/xdg v0.5.0 h1:dDaZvhMXatArP1NPHhnfaQUqWBLBsmx1h1HXQdMoFCY=
github.com/adrg/xdg v0.5.0/go.mod h1:dDdY4M4DF9Rjy4kHPeNL+ilVF+p2lK8IdM9/rTSGcI4=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/etkecc/go-ansible v0.0.0-20240808194949-0bb776cada0c h1:hTCplzj1hl5g02S1QFBtYgb2x0EQDbkMKtuOc5oAoMk=
github.com/etkecc/go-ansible v0.0.0-20240808194949-0bb776cada0c/go.mod h1:9W3L/MFAP7MQkvfk+NvSLmOrv3PRf8UksmN+sFYzB7U=
github.com/etkecc/go-ansible v0.0.0-20240909185856-90ce4b4ef3e7 h1:ZidSrepBQOty0Ilt3ywDnY25efLKH0ziuZwf9MI3YhU=
github.com/etkecc/go-ansible v0.0.0-20240909185856-90ce4b4ef3e7/go.mod h1:IRpib27SBWU4GGETooOtgXPvP5sRUw2UT5+Vbxls9do=
github.com/etkecc/go-kit v1.0.0 h1:NdnSnjrR60Piy3+Rae9VjBJMgBaaH96QG12aC35sOHo=
github.com/etkecc/go-kit v1.0.0/go.mod h1:ZFeQrvlMIV6OeZ4XJ090kkyNYRRN4+5wcg1vjnOKEGI=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa h1:ELnwvuAXPNtPk1TJRuGkI9fDTwym6AYBu0qzT8AcHdI=
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ=
golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=
golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY=
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
10 changes: 7 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ default:

# update go deps
update *flags:
go get {{ flags }} ./cmd
go get {{ flags }} ./cmd/ansible-wg-sync
go mod tidy
go mod vendor

Expand All @@ -28,8 +28,12 @@ test packages="./...":

# run app
run:
@go run ./cmd
@go run ./cmd/ansible-wg-sync

# install app
install:
@CGO_ENABLED=0 go install -ldflags '-extldflags "-static"' -tags timetzdata,goolm -v ./cmd/ansible-wg-sync

# build app
build:
CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' -tags timetzdata,goolm -v -o ansible-wg-sync ./cmd
@CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' -tags timetzdata,goolm -v ./cmd/ansible-wg-sync
4 changes: 3 additions & 1 deletion vendor/github.com/etkecc/go-ansible/ansible.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions vendor/github.com/etkecc/go-ansible/hostsini.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/github.com/etkecc/go-ansible/hostvars.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion vendor/github.com/etkecc/go-ansible/merger.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions vendor/github.com/etkecc/go-ansible/parsers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 0 additions & 36 deletions vendor/github.com/etkecc/go-ansible/utils.go

This file was deleted.

Loading

0 comments on commit cd88d30

Please sign in to comment.