Add appveyor config, changelog, README TLC, and update TravisCI Go to 1.14

pull/38/head
Chris Bednarski 4 years ago
parent 18546969ce
commit dd746035f7

@ -0,0 +1,9 @@
install:
- go version
build: false
deploy: false
test_script:
- go test ./...
- go vet ./...

@ -1,7 +1,7 @@
language: go language: go
go: go:
- 1.13.8 - 1.14
- master - master
notifications: notifications:

@ -0,0 +1,3 @@
# Change Log
TODO

@ -1,6 +1,6 @@
# hostess [![](https://travis-ci.org/cbednarski/hostess.svg)](https://travis-ci.org/cbednarski/hostess) [![Coverage Status](https://coveralls.io/repos/cbednarski/hostess/badge.svg)](https://coveralls.io/r/cbednarski/hostess) [![GoDoc](https://godoc.org/github.com/cbednarski/hostess?status.svg)](http://godoc.org/github.com/cbednarski/hostess) # hostess [![Linux Build Status](https://travis-ci.org/cbednarski/hostess.svg)](https://travis-ci.org/cbednarski/hostess) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/wtxqb880b7v9dfgn/branch/master?svg=true)](https://ci.appveyor.com/project/cbednarski/hostess/branch/master) [![GoDoc](https://godoc.org/github.com/cbednarski/hostess?status.svg)](http://godoc.org/github.com/cbednarski/hostess)
An **idempotent** command-line utility for managing your `/etc/hosts` file. An **idempotent** command-line utility for managing your `/etc/hosts`* file.
hostess add local.example.com 127.0.0.1 hostess add local.example.com 127.0.0.1
hostess add staging.example.com 10.0.2.16 hostess add staging.example.com 10.0.2.16
@ -10,7 +10,10 @@ Because sometimes DNS doesn't work in production. And because editing
`/etc/hosts` by hand is a pain. Put hostess in your `Makefile` or deploy scripts `/etc/hosts` by hand is a pain. Put hostess in your `Makefile` or deploy scripts
and call it a day. and call it a day.
**Note: 0.5.0 has backwards incompatible changes in the API and CLI.** \* And `C:\Windows\System32\drivers\etc\hosts` on Windows.
**Note: 0.5.0 has backwards incompatible changes in the API and CLI.** See
`CHANGELOG.md` for details.
## Installation ## Installation
@ -19,11 +22,11 @@ from GitHub, or build from source (with a [recent version of Go](https://golang.
go get -u github.com/cbednarski/hostess go get -u github.com/cbednarski/hostess
### Usage ## Usage
Run `hostess` or `hostess -h` to see a full list of commands. Run `hostess` or `hostess -h` to see a full list of commands.
### Behavior ## Format
On unixes, hostess follows the format specified by `man hosts`, with one line On unixes, hostess follows the format specified by `man hosts`, with one line
per IP address: per IP address:
@ -40,13 +43,16 @@ On Windows, hostess writes each hostname on its own line.
## Configuration ## Configuration
You can force hostess to behave one way or the other with `HOSTESS_FMT=windows` hostess may be configured via environment variables.
or `HOSTESS_FMT=unix`.
- `HOSTESS_FMT` may be set to `windows` or `unix` to override platform detection
for the hosts file format. See Behavior, above, for details
By default, hostess will read / write to `/etc/hosts`. You can use the - `HOSTESS_PATH` may be set to override platform detection for the location of
`HOSTESS_PATH` environment variable to provide an alternate path (for testing). the hosts file. By default this is `C:\Windows\System32\drivers\etc\hosts` on
Windows and `/etc/hosts` everywhere else.
### IPv4 and IPv6 ## IPv4 and IPv6
Your hosts file _may_ contain overlapping entries where the same hostname points Your hosts file _may_ contain overlapping entries where the same hostname points
to both an IPv4 and IPv6 IP. In this case, hostess commands will apply to both to both an IPv4 and IPv6 IP. In this case, hostess commands will apply to both

Loading…
Cancel
Save