|
1 | 1 | # samesame |
2 | 2 |
|
3 | 3 | The Web Bot Auth implementation for Anubis. |
4 | | - |
5 | | -## Overview |
6 | | - |
7 | | -A Go library providing basic arithmetic operations. |
8 | | - |
9 | | -## Installation |
10 | | - |
11 | | -```bash |
12 | | -go get github.com/TecharoHQ/samesame |
13 | | -``` |
14 | | - |
15 | | -## Usage |
16 | | - |
17 | | -```go |
18 | | -package main |
19 | | - |
20 | | -import ( |
21 | | - "fmt" |
22 | | - "github.com/TecharoHQ/samesame" |
23 | | -) |
24 | | - |
25 | | -func main() { |
26 | | - result := samesame.Add(2, 3) |
27 | | - fmt.Println(result) // Output: 5 |
28 | | -} |
29 | | -``` |
30 | | - |
31 | | -## Development |
32 | | - |
33 | | -This project uses the following tools: |
34 | | - |
35 | | -- **Go**: Programming language |
36 | | -- **goimports**: Automatic import formatting |
37 | | -- **commitlint**: Commit message linting |
38 | | -- **prettier**: Code formatting for JS/JSON/Markdown files |
39 | | -- **husky**: Git hooks management |
40 | | - |
41 | | -### Prerequisites |
42 | | - |
43 | | -- Go 1.24+ installed |
44 | | -- Node.js and npm installed |
45 | | - |
46 | | -### Setup |
47 | | - |
48 | | -1. Clone the repository |
49 | | -2. Install dependencies: |
50 | | - ```bash |
51 | | - npm install |
52 | | - ``` |
53 | | - |
54 | | -### Available Scripts |
55 | | - |
56 | | -- `npm run test` - Run Go tests |
57 | | -- `npm run fmt` - Format all code (Go and JS/JSON/Markdown) |
58 | | -- `npm run lint` - Run Go vet for static analysis |
59 | | - |
60 | | -### Pre-commit Hooks |
61 | | - |
62 | | -The project includes pre-commit hooks that automatically: |
63 | | - |
64 | | -- Format Go code with goimports and go fmt |
65 | | -- Run go vet for static analysis |
66 | | -- Run all tests |
67 | | -- Format JavaScript, JSON, and Markdown files with prettier |
68 | | - |
69 | | -### Commit Message Format |
70 | | - |
71 | | -This project follows the [Conventional Commits](https://www.conventionalcommits.org/) specification. Commit messages must be in the format: |
72 | | - |
73 | | -``` |
74 | | -<type>: <description> |
75 | | -``` |
76 | | - |
77 | | -Example: `feat: add new authentication method` |
78 | | - |
79 | | -Valid types: feat, fix, docs, style, refactor, test, chore, etc. |
0 commit comments