mirror of
https://github.com/Slug-Boi/cocommit.git
synced 2026-05-13 20:55:47 +00:00
fix: Think I fixed the syntax for group declartion
This commit is contained in:
@@ -48,7 +48,14 @@ func main() {
|
|||||||
|
|
||||||
// reads the input of authors file and formats accordingly
|
// reads the input of authors file and formats accordingly
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
info := strings.Split(scanner.Text(), "|")
|
input_str := scanner.Text()
|
||||||
|
group_info := []string{}
|
||||||
|
if strings.Contains(input_str, ";;") {
|
||||||
|
input := strings.Split(input_str, ";;")
|
||||||
|
input_str = input[0]
|
||||||
|
group_info = append(group_info, strings.Split(input[1],"|")...)
|
||||||
|
}
|
||||||
|
info := strings.Split(input_str, "|")
|
||||||
usr := user{username: info[2], email: info[3]}
|
usr := user{username: info[2], email: info[3]}
|
||||||
users[info[0]] = usr
|
users[info[0]] = usr
|
||||||
users[info[1]] = usr
|
users[info[1]] = usr
|
||||||
@@ -57,9 +64,9 @@ func main() {
|
|||||||
if info[4] == "ex" {
|
if info[4] == "ex" {
|
||||||
defExclude = append(defExclude, info[2])
|
defExclude = append(defExclude, info[2])
|
||||||
}
|
}
|
||||||
} else if len(info) > 5 {
|
} else if len(group_info) > 0 {
|
||||||
// Group assignment
|
// Group assignment
|
||||||
for _, group := range info[5:] {
|
for _, group := range group_info {
|
||||||
if groups[group] == nil {
|
if groups[group] == nil {
|
||||||
groups[group] = []user{usr}
|
groups[group] = []user{usr}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user