Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5bfb52d

Browse files
committedSep 17, 2021
add some solutions
1 parent c43d16b commit 5bfb52d

File tree

1,419 files changed

+2170
-14938
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,419 files changed

+2170
-14938
lines changed
 

‎cmd/config.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
package main
22

3-
type GitHub struct {
4-
}
3+
type GitHub struct{}

‎cmd/contribution.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ type Contributor struct {
1818
ContributionType []string `json:"contribution_type"`
1919
}
2020

21-
const GITHUB_CONTRIBUTOR_API_URL = "https://api.github.com/repos/kylesliu/awesome-golang-algorithm/contributors"
22-
const GITHUB_CONTRIBUTOR_TMPL_PATH = "./tpl/.all-contributorsrc"
21+
const (
22+
GITHUB_CONTRIBUTOR_API_URL = "https://api.github.com/repos/kylesliu/awesome-golang-algorithm/contributors"
23+
GITHUB_CONTRIBUTOR_TMPL_PATH = "./tpl/.all-contributorsrc"
24+
)
2325

2426
func getContributorBufer() []byte {
25-
2627
contributor_buffer := Request("GET", GITHUB_CONTRIBUTOR_API_URL, nil)
2728

2829
return contributor_buffer
@@ -57,14 +58,15 @@ func GetContributorInstance() []Contributor {
5758
}
5859
return contributors
5960
}
61+
6062
func getContributorTemplate() string {
6163
buffer := ReadFile(GITHUB_CONTRIBUTOR_TMPL_PATH)
6264
return string(buffer)
6365
}
6466

6567
func GenerateContributorTemplete() {
6668
tpl_str := getContributorTemplate()
67-
//fmt.Println(tpl_str)
69+
// fmt.Println(tpl_str)
6870
contributors := GetContributorInstance()
6971

7072
fmt.Println(contributors)

0 commit comments

Comments
 (0)
Please sign in to comment.