Skip to content

Commit

Permalink
Clarify installation instructions
Browse files Browse the repository at this point in the history
This commit updates the installation instructions. We also update the
repository to use a recent version of Go.

Close #7
  • Loading branch information
olivere committed Nov 21, 2023
1 parent 4dde7ec commit 770ca29
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The MIT License (MIT)
Copyright © 2012-2019 Oliver Eilhard
Copyright © 2012-2023 Oliver Eilhard

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,23 @@ Be sure to

![imgls](/img/imgls.png?raw=true "imgls")

# Installation
## Installation

To install `imgcat`, type:
To install `imgcat`, you should have a recent version of Go (1.21+ at the time of writing this), and type:

```go
GO111MODULE=on go get -u github.com/olivere/iterm2-imagetools/cmd/imgcat
go install github.com/olivere/iterm2-imagetools/cmd/imgcat@latest
```

To install `imgls`, type:

```go
GO111MODULE=on go get -u github.com/olivere/iterm2-imagetools/cmd/imgls
go install github.com/olivere/iterm2-imagetools/cmd/imgls@latest
```

# License
The binaries then get installed into the `$GOPATH/bin` directory (or `$HOME/go/bin` if `GOPATH` is not set; see `go help install`), which you can add to your `$PATH`.

## License

MIT-LICENSE. See [LICENSE](http://olivere.mit-license.org/)
or the LICENSE file provided in the repository for details.
3 changes: 1 addition & 2 deletions cmd/imgcat/imgcat.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"flag"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"os"
Expand Down Expand Up @@ -66,7 +65,7 @@ func main() {
}

func display(r io.Reader) error {
data, err := ioutil.ReadAll(r)
data, err := io.ReadAll(r)
if err != nil {
return err
}
Expand Down
3 changes: 1 addition & 2 deletions cmd/imgls/imgls.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"flag"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"path/filepath"
Expand Down Expand Up @@ -53,7 +52,7 @@ func main() {
}

func display(filename string, r io.Reader) error {
data, err := ioutil.ReadAll(r)
data, err := io.ReadAll(r)
if err != nil {
return err
}
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module github.com/olivere/iterm2-imagetools

go 1.12
go 1.21.0

toolchain go1.21.4

0 comments on commit 770ca29

Please sign in to comment.