File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -21,21 +21,20 @@ func runDescription(cmd *base.Command, args []string) {
2121 }
2222 var wg sync.WaitGroup
2323 limit := 1 << 7
24- jobs := make (chan * leetcode.StatStatusPairsType , limit )
24+ jobs := make (chan leetcode.StatStatusPairsType , limit )
2525 for i := 0 ; i < limit ; i ++ {
2626 go worker (jobs , & wg )
2727 }
2828 problems := leetcode .ProblemsAll ()
2929 for _ , problem := range problems .StatStatusPairs {
30- problem := problem
3130 fmt .Println (problem .Stat .FrontendQuestionId , "\t " + problem .Stat .QuestionTitle )
3231 wg .Add (1 )
33- jobs <- & problem
32+ jobs <- problem
3433 }
3534 wg .Wait ()
3635}
3736
38- func worker (jobs <- chan * leetcode.StatStatusPairsType , wg * sync.WaitGroup ) {
37+ func worker (jobs <- chan leetcode.StatStatusPairsType , wg * sync.WaitGroup ) {
3938 for problem := range jobs {
4039 titleSlug := problem .Stat .QuestionTitleSlug
4140 question := leetcode .QuestionData (titleSlug , false ).Data .Question
You can’t perform that action at this time.
0 commit comments