Skip to content

Commit

Permalink
update libhosty
Browse files Browse the repository at this point in the history
  • Loading branch information
areYouLazy committed Jun 22, 2021
1 parent 71bfc9c commit 5907063
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Query can be done by IP or FQDN`,

// get flags
details, _ := cmd.Flags().GetBool("details")
fqdn, _ := cmd.Flags().GetString("fqdn")
// fqdn, _ := cmd.Flags().GetString("fqdn")

// try to parse arg as ip
ip := net.ParseIP(arg)
Expand All @@ -37,7 +37,7 @@ Query can be done by IP or FQDN`,
return
}

hf.RemoveHostsFileLinesByHostnameAsRegexp(fqdn)
hf.RemoveHostsFileLinesByHostnameAsRegexp(arg)
default:
// delete needs to get data before acting
// otherwise we'll not have data for detailed output
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var (
Long: `Hosty is a command-line tool to interact with the /etc/hosts file.
It allows for fast inspect and edit of the file. Main goals of this tool are to be fast, reliable and scriptable.
Hosty uses libhosty to manipulate the file. You can find more about libhosty at https://github.com/areYouLazy/libhosty`,
Version: "1.0.2",
Version: "1.0.3",
PersistentPreRun: func(cmd *cobra.Command, args []string) {
// init libhosty here because only here we're sure to have
// all flags parsed by cobra
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module github.com/areYouLazy/hosty
go 1.16

require (
github.com/areYouLazy/libhosty v1.0.0
github.com/areYouLazy/libhosty v1.0.2
github.com/spf13/cobra v1.1.3
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/areYouLazy/libhosty v1.0.0 h1:V8yE6oeXgkGQsffV0DB6JnF/KntGu5TmbF8sQzvc2Jk=
github.com/areYouLazy/libhosty v1.0.0/go.mod h1:dV4ir3feRrTbWdcJ21mt3MeZlASg0sc8db6nimL9GOA=
github.com/areYouLazy/libhosty v1.0.2 h1:fgMtpbnoE43xK/ElZNt4SVFOJ970pHQWKgMBlL4DNfk=
github.com/areYouLazy/libhosty v1.0.2/go.mod h1:dV4ir3feRrTbWdcJ21mt3MeZlASg0sc8db6nimL9GOA=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
Expand Down

0 comments on commit 5907063

Please sign in to comment.