Skip to content

Commit

Permalink
Merge pull request #1 from thuongtruong1009/doc
Browse files Browse the repository at this point in the history
docs: setup document package
  • Loading branch information
thuongtruong1009 authored Mar 4, 2024
2 parents 8c1672d + d10a485 commit 9ac2298
Show file tree
Hide file tree
Showing 400 changed files with 24,666 additions and 11,748 deletions.
9 changes: 8 additions & 1 deletion .deepsource.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,11 @@ name = "shell"
name = "go"

[analyzers.meta]
import_root = "github.com/thuongtruong1009/gouse"
import_root = "github.com/thuongtruong1009/gouse"

[[analyzers]]
name = "javascript"

[analyzers.meta]
plugins = ["react"]
environment = ["nodejs"]
103 changes: 99 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,107 @@

First, thank you for contributing! We love and encourage pull requests from everyone.

### Abstract

Before submitting major changes, here are a few guidelines to follow:

1. Check the [open issues][issues] and [pull requests][prs] for existing discussions.
2. Open an [issue][issues] first, to discuss a new feature or enhancement.
3. Write tests, and make sure the test suite passes locally and on CI.
4. Open a pull request, and reference the relevant issue(s).
#### 1. Check for existing issues or PRs

Before starting, please check the [open issues][issues] and [pull requests][prs] for existing discussions. If you don't find an issue or PR, please open a new issue to discuss the new feature or enhancement.

#### 2. Open an issue

If you plan to add a new feature or enhancement, please open an issue first to discuss it. This will help us to understand your needs and provide feedback.

#### 3. Branching

Always add features or fixes in a new branch, and never in `main`. This will help us to review and test your changes before merging them into the main codebase.

#### 4. Write tests

We have a test suite for the project, and we expect you to write tests for your changes. Make sure the test suite passes locally and on CI.

#### 5. Run `make pre`

Before submitting your changes, run `make pre` to ensure your changes pass all checks. This will run the linter, tests, and other checks.

#### 6. Update the documentation

Make sure to update the documentation to reflect your changes. This includes the README, and any other relevant documentation.

#### 7. Open a pull request

[issues]: https://github.com/thuongtruong1009/gouse/issues
[prs]: https://github.com/thuongtruong1009/gouse/pulls

### Commands

### 1. Install dependencies

```bash
$ make install
```

#### 3. Run

```bash
$ make run
```

#### 4. Build

```bash
$ make build
```

#### 5. Run tests

```bash
$ make test
```

#### 6. Run linters & formatters

```bash
$ make lint
```

#### 7. Run benchmarks

```bash
$ make bench
```

#### 8. Auto-generate docs

```bash
$ make doc
```

#### 9. Clean up the project

```bash
$ make clean
```

#### 10. Pre-commit checks

```bash
$ make pre
```

#### 11. Get help

```bash
$ make help
```

### License

By contributing, you agree that your contributions will be licensed under its [MIT License](../LICENSE).

### References

- [GitHub Flow](https://guides.github.com/introduction/flow/)
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
- [How to Write the Perfect Pull Request](https://github.blog/2015-01-21-how-to-write-the-perfect-pull-request/)
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## PR Checklist
## PR Pre-flight Checklist

Please check if your PR fulfills the following requirements:

- [ ] I have read the Contributing Guidelines on pull requests.
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)

Expand Down
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,5 @@ tmp
*.sh

*.log
*.prof
*.pprof
*.zip
*.html
*.json
*.yaml
*.toml
!.deepsource.toml
*.exe
43 changes: 25 additions & 18 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
MIT License
Copyright (c) 2023 Tran Nguyen Thuong Truong. All rights reserved.

Copyright (c) 2023 Tran Nguyen Thuong Truong
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ build:

doc:
@echo "Generating docs..."
go run docs/generate.go ./samples
go run docs/generate.go ./samples ./samples/api ./samples/array ./samples/cache ./samples/chart ./samples/config ./samples/crypto ./samples/date ./samples/function ./samples/helper ./samples/io ./samples/io/dir ./samples/io/file ./samples/io/path ./samples/math/check ./samples/math/operator ./samples/math/geometry ./samples/math/fomular ./samples/net ./samples/number ./samples/regex ./samples/strings ./samples/structs ./samples/tools ./samples/types/cast ./samples/types/check
@echo "Done!"

test:
Expand Down Expand Up @@ -56,7 +56,7 @@ lint:

count:
@echo "Counting lines..."
bash count.sh public/count.svg true 13708a array cache chart config crypto console date function helper io log math net number regex strings structs tools types
bash count.sh public/count.svg true 13708a api array cache chart config connection crypto console date function helper io log math net number regex strings structs tools types
@echo "Done!"

pre:
Expand Down
107 changes: 34 additions & 73 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@
- Gouse is a modern essential [`Golang`](https://golang.org/) utility package delivering consistency, modularity, performance, & extras presets inspired by [`Lodash`](https://lodash.com/).
- `Javascript` user-friendly syntax.
- No config - import as utility functions.
- Lightweight package: easy to use, chainable, and extendable, and available in a variety of builds & module formats.
- Gouse provides a wide variety of available methods, taking the hassle out of working with arrays, numbers, objects, strings, etc. Each method has a different set of features, so you can pick the ones that fit your project best.
- Lightweight package: easy to use, chainable, and extendable, and available in various builds & module formats.
- Gouse provides a wide variety of available methods, taking the hassle out of working with arrays, numbers, objects, strings, etc. Each method has different features, so you can pick the ones that fit your project best.
- Comprehensive documentation and examples.
- Powerful package which suitable for small to large projects and compatible on all OS platforms
- Powerful package that is suitable for small to large projects and compatible with all OS platforms
- Thanks to Gouse, you can:
- Setup and scale projects rapidly.
- Handle complex logic usecases such as database connection, build APIs, error handling, log management...
- Set up and scale projects rapidly.
- Handle complex logic use-cases such as database connection, build APIs, error handling, log management...
- Optimize performance and increase productivity.
- Build easily a complete system with available functions.
- Reduce the number of lines of code and make it easier to read, understand and maintain.
- Build easily consistent systems with available functions.
- Avoid writing repetitive code and a unified code style.
- Reduce the number of lines of code and make it easier to read, understand, and maintain.
- Avoid compatibility conflicts and unexpected errors.
- And more...

Expand All @@ -49,30 +50,29 @@

## πŸš€ Features

> Below is a list of modules that Gouse supports. This project is still in development, so not all features are available.
βœ… [Array](docs/gen/samples/array.md) <br/>
βœ… [Cache](docs/gen/samples/cache.md) <br/>
βœ… [Chart](docs/gen/samples/chart.md) <br/>
βœ… [Config](docs/gen/samples/config.md) <br/>
βœ… [Console](docs/gen/samples/console.md) <br/>
βœ… [Date](docs/gen/samples/date.md) <br/>
βœ… [Function](docs/gen/samples/function.md) <br/>
βœ… [Helper](docs/gen/samples/helper.md) <br/>
βœ… [I/O](docs/gen/samples/io.md) <br/>
βœ… [Log](docs/gen/samples/log.md) <br/>
βœ… [Math](docs/gen/samples/math.md) <br/>
βœ… [Net](docs/gen/samples/net.md) <br/>
βœ… [Number](docs/gen/samples/number.md) <br/>
βœ… [Regex](docs/gen/samples/regex.md) <br/>
βœ… [Struct](docs/gen/samples/struct.md) <br/>
βœ… [String](docs/gen/samples/string.md) <br/>
βœ… [Tool](docs/gen/samples/tool.md) <br/>
βœ… [Type](docs/gen/samples/type.md) <br/>
> Below is a list of modules that Gouse supports. This project is still in development stage, so not all features are available.
βœ… Array <br/>
βœ… Cache <br/>
βœ… Chart <br/>
βœ… Config <br/>
βœ… Connection <br/>
βœ… Console <br/>
βœ… Date <br/>
βœ… Function <br/>
βœ… Helper <br/>
βœ… I/O <br/>
βœ… Log <br/>
βœ… Math <br/>
βœ… Net <br/>
βœ… Number <br/>
βœ… Regex <br/>
βœ… Struct <br/>
βœ… String <br/>
βœ… Tool <br/>
βœ… Type <br/>

<!-- - [ ] API
- [ ] Collection
- [ ] Connection
- [ ] Cron
- [ ] Error
- [ ] Json
Expand Down Expand Up @@ -149,59 +149,19 @@ func main() {

## πŸ› οΈ Development

#### 1. Clone this repository

```bash
$ git clone https://github.com/thuongtruong1009/gouse.git
```

#### 2. Install dependencies

```bash
$ make install
```

#### 3. Run

```bash
$ make run
```

#### 4. Build

```bash
$ make build
```

#### 5. Run tests

```bash
$ make test
```

#### 6. Run linters & formatters

```bash
$ make lint
```

#### 7. Run benchmarks

```bash
$ make bench
```

#### 8. Auto-generate docs

```bash
$ make doc
```
- Refer to the [`Contributing Commands`](.github/CONTRIBUTING.md#commands) section for more information on how to develop the project.

## πŸ“ Contributing

- We welcome your contributions! If you're looking for issues to work on, try looking at the good first issue list. We do our best to tag issues suitable for new external contributors with that label, so it's a great way to find something you can help with!

- [`Code of Conduct`](.github/CODE_OF_CONDUCT.md) and [`Contributing Guide`](.github/CONTRIBUTING.md) for the project.
- Please read our [`Code of Conduct`](.github/CODE_OF_CONDUCT.md) before contributing.

- Refer to the [`Contributing Guide`](.github/CONTRIBUTING.md) for more information on how to get started.

## πŸ“„ License

Expand Down Expand Up @@ -253,6 +213,7 @@ $ make doc
- [Crypto](golang.org/x/crypto) - A collection of cryptographic algorithms and protocols for Go πŸ“¦
- [Go eCharts](github.com/go-echarts/go-echarts) - 🎨 The adorable charts library for Golang πŸ“Š
- [Env config](github.com/kelseyhightower/envconfig) x [Go Toml](github.com/pelletier/go-toml) - A Go library for managing configuration data from files πŸ“„
- [Minio Client Go](github.com/minio/minio-go/v7) - MinIO Go Library for Amazon S3 compatible cloud storage πŸ“¦

## πŸ“š References

Expand Down
1 change: 0 additions & 1 deletion api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@
- mock data
- http methods
- routing
- validation
- interceptors
Loading

0 comments on commit 9ac2298

Please sign in to comment.