Skip to content

Commit 1d9cb07

Browse files
authored
Update README.md file (#1)
* update README.md file * add simple test * update ci.yml file
1 parent 31ae1b8 commit 1d9cb07

File tree

5 files changed

+38
-12
lines changed

5 files changed

+38
-12
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,7 @@ jobs:
1717
- name: Set up Go
1818
uses: actions/setup-go@v4
1919
with:
20-
go-version: '1.20'
21-
22-
- name: Cache Go modules
23-
uses: actions/cache@v3
24-
with:
25-
path: |
26-
~/.cache/go-build
27-
~/go/pkg/mod
28-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
29-
restore-keys: |
30-
${{ runner.os }}-go-
20+
go-version: '1.24'
3121

3222
- name: Run tests
3323
run: go test ./... -v

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,26 @@ Welcome to my journey of mastering Data Structures and Algorithms (DSA) by solvi
9292

9393
---
9494

95+
## 📌 Contributing Rules & Branch Naming Convention
96+
97+
To keep this repository clean, consistent, and collaboration-ready, we follow a few naming and commit conventions.
98+
99+
### ✅ Branch Naming Convention
100+
101+
Create branches using the format:
102+
**Example:**
103+
1-arrays/1-two-sum
104+
105+
---
106+
107+
### ✅ Pull Request Naming Convention
108+
109+
PR titles must follow the format:
110+
**Example:**
111+
1-arrays/1-two-sum: implement two sum solution using hashmap
112+
113+
---
114+
95115
## 🔗 Resources
96116

97117
- [NeetCode Practice Platform](https://neetcode.io/practice)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/javy99/problem-solving-golang
22

3-
go 1.24.2
3+
go 1.24

main/hello.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package main
2+
3+
func Hello() string {
4+
return "Hello, world!"
5+
}

main/hello_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package main
2+
3+
import "testing"
4+
5+
func TestHello(t *testing.T) {
6+
expected := "Hello, world!"
7+
got := Hello()
8+
if got != expected {
9+
t.Errorf("Hello() = %q; want %q", got, expected)
10+
}
11+
}

0 commit comments

Comments
 (0)