Skip to content

Commit

Permalink
README file
Browse files Browse the repository at this point in the history
  • Loading branch information
201RichK committed Jan 5, 2021
1 parent 7e69baf commit 22eec0a
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Remote [![Build Status](https://travis-ci.org/sirupsen/logrus.svg?branch=master)](https://201r.com)

Remote is a structure pawerfull Golang http api that allow us to make some request on avery api or an URL
if you want a well organized code, you'll love remote.

## Installation

To install remote package, you need to install Go and set your Go workspace first.

1. The first need [Go](https://golang.org/) installed (**version 1.12+ is required**), then you can use the below Go command to install Gin.

```sh
$ go get -u github.com/201RichK/remote
```

2. Import it in your code:

```go
import "github.com/201RichK/remote"
```
3. Quick start

```sh
# assume the following codes in example.go file
$ cat example.go
```

```go
package main

import (
"github.com/201RichK/remote"
"fmt"
)

func main() {
//Create new config
client := remote.NewRemote(remote.Config{})

res, err := client.GET(remote.Options{
URL: "https://google.com",
})

if err != nil {
fmt.Println(err)
}

if err := json.NewDecoder(os.Stdout).Decode(res.Body); err != nil {
fmt.Println(err)
}

}
```

0 comments on commit 22eec0a

Please sign in to comment.