Skip to content

Commit e10f255

Browse files
authored
Merge pull request #6 from leozz37/develop
Updated version of docs
2 parents ff6ad65 + 4b7db3e commit e10f255

File tree

2 files changed

+16
-85
lines changed

2 files changed

+16
-85
lines changed

README.md

Lines changed: 12 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ Hare is a user-friendly lib for sockets in Golang. You can send and listen to TC
1818
## Contents
1919

2020
- [Installation](#installation)
21-
- [Quick start](#quick-start)
21+
- [Quickstart](#quickstart)
2222
- [Documentation](#documentation)
2323
- [Examples](#examples)
2424
- [Testing](#testing)
2525
- [Contributing](#contributing)
2626
- [License](#license)
2727

28-
## Installation
28+
## 🖥️ Installation
2929

30-
First you need [Go](https://golang.org/) installed (version 1.12+ is required), then you can install Hare:
30+
First, you need [Go](https://golang.org/) installed (version 1.12+ is required), then you can install Hare:
3131

3232
```shell
3333
$ go get -u "github.com/leozz37/hare"
@@ -47,7 +47,7 @@ $ brew tap leozz37/jaguar
4747
$ brew install jaguar
4848
```
4949

50-
## Quick start
50+
## 🍕 Quickstart
5151

5252
[Sample code](./examples/send.go) for sending payloads:
5353

@@ -85,9 +85,9 @@ func main() {
8585
}
8686
```
8787

88-
## Documentation
88+
## 📖 Documentation
8989

90-
The library consists on two features: **listen** and **send** to a given port. You can check the full documentation on [Godoc](https://pkg.go.dev/github.com/leozz37/hare#section-documentation).
90+
The library consists of two features: **listen** and **send** to a given port. You can check the full documentation on [Godoc](https://pkg.go.dev/github.com/leozz37/hare#section-documentation).
9191

9292
### Send
9393

@@ -195,11 +195,11 @@ func main() {
195195
}
196196
```
197197
198-
## Examples
198+
## 📙 Examples
199199
200200
You can check the [example](./examples) for code usages, like [send](./examples/send.go) and [listen](./examples/listen.go) samples.
201201
202-
Since Hare only listen and send messages, here's a complete example:
202+
Since Hare only listens and send messages, here's a complete example:
203203
204204
```go
205205
package main
@@ -233,7 +233,7 @@ func main() {
233233
}
234234
```
235235
236-
## Testing
236+
## 🧪 Testing
237237
238238
To run the test suite, you can run with:
239239
@@ -247,79 +247,10 @@ If you want a more detailed report with coverage and an `coverage.out` file, do
247247
$ go test -v -covermode=count -coverprofile=coverage.out
248248
```
249249
250-
## Contributing
250+
## 🤝 Contributing
251251
252-
A full guideline about contributing to Alacritty can be found in the [CONTRIBUTING.md](./CONTRIBUTING.md) file.
252+
A full guideline about contributing to Hare can be found in the [CONTRIBUTING.md](./CONTRIBUTING.md) file.
253253
254-
### Issues
255-
256-
Use the search tool before opening a new issue.
257-
258-
Please provide source code and commit sha if you found a bug.
259-
260-
Review existing issues and provide feedback or react to them.
261-
262-
### Pull requests
263-
264-
Open your pull request against ```develop```.
265-
266-
You should add/modify tests to cover your proposed code changes.
267-
268-
Tests coverage should never go down from 90%.
269-
270-
If your pull request contains a new feature, please document it on the README.
271-
272-
### Branching
273-
274-
The ```main``` is a **regular branch** which always contains the latest
275-
**stable** codebase and must **never** be broken.
276-
277-
The ```develop``` is a **regular branch** which always contains the latest
278-
**development** codebase and **eventually** can be broken. But you'll need to
279-
accept the **sombrero of shame** if you do that.
280-
281-
The ```release``` is a **regular branch** which contains a specific release
282-
version. You must use the following name convention: **release-X.Y.Z**, where
283-
X, Y and Z are: major, minor and patch [version numbers](#versioning).
284-
285-
The ```experimental``` is a **temporary branch** which contains a new feature or
286-
ideia. You must use the following name convention: **experimental-brief-description**.
287-
288-
The ```feature``` is a **temporary branch** which contains a new feature under
289-
development that latter will be merged against the development branch. You must
290-
use the following name convention: **feature-brief-description**.
291-
292-
The ```bugfix``` is a **temporary branch** which contains necessary fix to be
293-
applied **after** a specific release to be merged against the development branch.
294-
You must use the following name convention: **bugfix-brief-description**.
295-
296-
The ```hotfix``` is a **temporary branch** which contains a critical fix to be
297-
applied **immediately** and merged against the main and the development branches.
298-
You must use the following name convention: **hotfix-brief-description**.
299-
300-
Feel free to apply the labels from GitHub to the branches, they are very helpful.
301-
302-
### Versioning
303-
304-
The project uses the [semantic versioning 2.0.0](https://semver.org) in
305-
order to control the version numbers.
306-
307-
### Commiting
308-
309-
The ```main```, ```develop``` and ```release``` branches have protection rules
310-
against **push**.
311-
312-
In order to contribute you must create a new branch following the [branching](#branching)
313-
guideline and once your work is done, open a **pull request** from your branch
314-
to the **develop** branch.
315-
316-
The **pull request** will trigger the test suites automatically
317-
and the code must **pass all the tests** and also be reviewed and approved
318-
before merged in the **develop** branch (or even ``main`` or ``release`` in case
319-
of a ``*fix``).
320-
321-
Feel free to apply the labels from GitHub to the pull requests, they are very helpful.
322-
323-
## License
254+
## ⚖️ License
324255
325256
Hare is released under the [MIT License](./LICENSE).

hare.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
)
77

88
const (
9-
connHost = "localhost"
10-
connType = "tcp"
9+
connectionHost = "localhost"
10+
connectionType = "tcp"
1111
)
1212

1313
// Listener tools for socket listening
@@ -41,7 +41,7 @@ func Listen(port string) (Listener, error) {
4141
var listener Listener
4242
var messageManager MessageManager
4343

44-
listener.SocketListener, err = net.Listen(connType, connHost+":"+port)
44+
listener.SocketListener, err = net.Listen(connectionType, connectionHost+":"+port)
4545
if err != nil {
4646
return listener, err
4747
}
@@ -70,7 +70,7 @@ func Listen(port string) (Listener, error) {
7070

7171
// Send message to socket port
7272
func Send(port, message string) error {
73-
conn, err := net.Dial(connType, connHost+":"+port)
73+
conn, err := net.Dial(connectionType, connectionHost+":"+port)
7474
if err != nil {
7575
return err
7676
}

0 commit comments

Comments
 (0)