Skip to content

Commit bf3ab66

Browse files
committed
update deps; add arm64 build
1 parent 491e7ef commit bf3ab66

File tree

6 files changed

+94
-34
lines changed

6 files changed

+94
-34
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ jobs:
4141
- name: Set up Go
4242
uses: actions/setup-go@v4
4343
with:
44-
go-version: 1.20
44+
go-version: "1.20"
4545
- name: Run GoReleaser
4646
uses: goreleaser/goreleaser-action@v4
4747
with:
4848
version: latest
49-
args: release --rm-dist
49+
args: release --clean
5050
env:
5151
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,15 @@ builds:
77
goos:
88
- linux
99
- darwin
10-
- windows
1110
goarch:
1211
- amd64
12+
- arm64
1313
ldflags:
1414
- -s -w -X github.com/mxssl/dns/cmd.version={{ .Version }}
1515
archives:
1616
- name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
1717
files:
1818
- none*
19-
replacements:
20-
darwin: Darwin
21-
linux: Linux
22-
windows: Windows
23-
amd64: x86_64
2419
checksum:
2520
name_template: 'checksums.txt'
2621
snapshot:

README.md

Lines changed: 80 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,69 @@
22

33
`dns` is a simple CLI tool for [DNS-LG API](http://www.dns-lg.com)
44

5-
<img src="./screen.png" alt="drawing" width="400"/>
5+
```sh
6+
dns a github.com
7+
{
8+
"question": [
9+
{
10+
"name": "github.com.",
11+
"type": "A",
12+
"class": "IN"
13+
}
14+
],
15+
"answer": [
16+
{
17+
"name": "github.com.",
18+
"type": "A",
19+
"class": "IN",
20+
"ttl": 60,
21+
"rdlength": 4,
22+
"rdata": "140.82.113.4"
23+
}
24+
]
25+
}
26+
```
627

728
## Install
829

930
### Download compiled binary
1031

11-
[Linux](https://github.com/mxssl/dns/releases/download/1.0.5/dns_Linux_x86_64.tar.gz)
32+
[Linux amd64](https://github.com/mxssl/dns/releases/download/1.0.7/dns_Linux_x86_64.tar.gz)
1233

13-
[Windows](https://github.com/mxssl/dns/releases/download/1.0.5/dns_Windows_x86_64.tar.gz)
34+
[MacOS amd64](https://github.com/mxssl/dns/releases/download/1.0.7/dns_darwin_amd64.tar.gz)
1435

15-
[MacOS](https://github.com/mxssl/dns/releases/download/1.0.5/dns_Darwin_x86_64.tar.gz)
36+
[MacOS arm64](https://github.com/mxssl/dns/releases/download/1.0.7/dns_darwin_arm64.tar.gz)
1637

1738
### Examples
1839

19-
Linux:
40+
Linux amd64:
41+
42+
```bash
43+
wget https://github.com/mxssl/dns/releases/download/1.0.7/dns_linux_amd64.tar.gz
44+
tar zvxf dns_linux_amd64.tar.gz
45+
mv dns /usr/local/bin/dns
46+
chmod +x /usr/local/bin/dns
47+
rm dns_linux_amd64.tar.gz
48+
```
49+
50+
MacOS amd64:
2051

2152
```bash
22-
wget https://github.com/mxssl/dns/releases/download/1.0.5/dns_Linux_x86_64.tar.gz
23-
tar zvxf dns_Linux_x86_64.tar.gz
24-
cp dns /usr/local/bin/dns
53+
wget https://github.com/mxssl/dns/releases/download/1.0.7/dns_darwin_amd64.tar.gz
54+
tar zvxf dns_darwin_amd64.tar.gz
55+
mv dns /usr/local/bin/dns
2556
chmod +x /usr/local/bin/dns
57+
rm dns_darwin_amd64.tar.gz
2658
```
2759

28-
MacOS
60+
MacOS arm64:
2961

3062
```bash
31-
wget https://github.com/mxssl/dns/releases/download/1.0.5/dns_Darwin_x86_64.tar.gz
32-
tar zvxf dns_Darwin_x86_64.tar.gz
33-
cp dns /usr/local/bin/dns
63+
wget https://github.com/mxssl/dns/releases/download/1.0.7/dns_darwin_arm64.tar.gz
64+
tar zvxf dns_darwin_arm64.tar.gz
65+
mv dns /usr/local/bin/dns
3466
chmod +x /usr/local/bin/dns
67+
rm dns_darwin_arm64.tar.gz
3568
```
3669

3770
## Usage
@@ -89,23 +122,23 @@ Use "dns [command] --help" for more information about a command
89122
## Example
90123

91124
```sh
92-
dns a golang.com
125+
dns a github.com
93126
{
94127
"question": [
95128
{
96-
"name": "golang.com.",
129+
"name": "github.com.",
97130
"type": "A",
98131
"class": "IN"
99132
}
100133
],
101134
"answer": [
102135
{
103-
"name": "golang.com.",
136+
"name": "github.com.",
104137
"type": "A",
105138
"class": "IN",
106-
"ttl": 299,
139+
"ttl": 60,
107140
"rdlength": 4,
108-
"rdata": "216.58.198.81"
141+
"rdata": "140.82.113.4"
109142
}
110143
]
111144
}
@@ -127,24 +160,48 @@ You can use these resolvers:
127160
| opendns2 | 208.67.220.220 |
128161
| quad9 | 9.9.9.9 |
129162

130-
```sh
131-
dns -r cloudflare a golang.com
163+
```bash
164+
dns a go.dev
132165
{
133166
"question": [
134167
{
135-
"name": "golang.com.",
168+
"name": "go.dev.",
136169
"type": "A",
137170
"class": "IN"
138171
}
139172
],
140173
"answer": [
141174
{
142-
"name": "golang.com.",
175+
"name": "go.dev.",
176+
"type": "A",
177+
"class": "IN",
178+
"ttl": 300,
179+
"rdlength": 4,
180+
"rdata": "216.239.34.21"
181+
},
182+
{
183+
"name": "go.dev.",
184+
"type": "A",
185+
"class": "IN",
186+
"ttl": 300,
187+
"rdlength": 4,
188+
"rdata": "216.239.32.21"
189+
},
190+
{
191+
"name": "go.dev.",
192+
"type": "A",
193+
"class": "IN",
194+
"ttl": 300,
195+
"rdlength": 4,
196+
"rdata": "216.239.36.21"
197+
},
198+
{
199+
"name": "go.dev.",
143200
"type": "A",
144201
"class": "IN",
145-
"ttl": 47,
202+
"ttl": 300,
146203
"rdlength": 4,
147-
"rdata": "172.217.168.49"
204+
"rdata": "216.239.38.21"
148205
}
149206
]
150207
}

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ require (
1616
github.com/inconshreveable/mousetrap v1.1.0 // indirect
1717
github.com/magiconair/properties v1.8.7 // indirect
1818
github.com/mitchellh/mapstructure v1.5.0 // indirect
19-
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
19+
github.com/pelletier/go-toml/v2 v2.0.9 // indirect
2020
github.com/spf13/afero v1.9.5 // indirect
2121
github.com/spf13/cast v1.5.1 // indirect
2222
github.com/spf13/jwalterweatherman v1.1.0 // indirect
2323
github.com/spf13/pflag v1.0.5 // indirect
2424
github.com/subosito/gotenv v1.4.2 // indirect
25-
golang.org/x/sys v0.8.0 // indirect
26-
golang.org/x/text v0.9.0 // indirect
25+
golang.org/x/sys v0.10.0 // indirect
26+
golang.org/x/text v0.11.0 // indirect
2727
gopkg.in/ini.v1 v1.67.0 // indirect
2828
gopkg.in/yaml.v3 v3.0.1 // indirect
2929
)

go.sum

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua
144144
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
145145
github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ=
146146
github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
147+
github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0=
148+
github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
147149
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
148150
github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
149151
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
@@ -175,6 +177,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
175177
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
176178
github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY=
177179
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
180+
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
181+
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
178182
github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8=
179183
github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
180184
github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4=
@@ -318,6 +322,8 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc
318322
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
319323
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
320324
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
325+
golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA=
326+
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
321327
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
322328
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
323329
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -329,6 +335,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
329335
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
330336
golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
331337
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
338+
golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4=
339+
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
332340
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
333341
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
334342
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=

screen.png

-308 KB
Binary file not shown.

0 commit comments

Comments
 (0)