Skip to content

Commit

Permalink
updated go.mod
Browse files Browse the repository at this point in the history
  • Loading branch information
phin1x committed Jun 25, 2023
1 parent 4f0b514 commit 822f93f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ go get -u github.com/phin1x/go-ipp

## Features

* only depends on the standard go library (only dependency is for testing)
* basic ipp 2.0 compatible Client
* extended client for cups server
* create custom ipp requests
Expand All @@ -22,6 +23,7 @@ go get -u github.com/phin1x/go-ipp
## Example

Print a file with the ipp client

```go
package main

Expand All @@ -36,6 +38,7 @@ func main() {
```

Craft and send a custom request

```go

package main
Expand All @@ -44,7 +47,7 @@ import "github.com/phin1x/go-ipp"

func main() {
// define a ipp request
req := ipp.NewRequest(OperationGetJobs, 1)
req := ipp.NewRequest(ipp.OperationGetJobs, 1)
req.OperationAttributes[ipp.AttributeWhichJobs] = "completed"
req.OperationAttributes[ipp.AttributeMyJobs] = myJobs
req.OperationAttributes[ipp.AttributeFirstJobID] = 42
Expand Down Expand Up @@ -89,8 +92,8 @@ func main() {
}

// check if the response status is "ok"
if resp.StatusCode == ipp.StatusOk {
panic(resp.StatusCode)
if err := resp.CheckForErrors(); err != nil {
panic(err)
}

// do something with the returned data
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module github.com/phin1x/go-ipp

go 1.13

require github.com/stretchr/testify v1.8.4 // indirect
require github.com/stretchr/testify v1.8.4
17 changes: 17 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
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/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/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
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.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

0 comments on commit 822f93f

Please sign in to comment.