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}
2222var wg sync.WaitGroup
2323limit := 1 << 7
24- jobs := make (chan * leetcode.StatStatusPairsType , limit )
24+ jobs := make (chan leetcode.StatStatusPairsType , limit )
2525for i := 0 ; i < limit ; i ++ {
2626go worker (jobs , & wg )
2727}
2828problems := leetcode .ProblemsAll ()
2929for _ , problem := range problems .StatStatusPairs {
30- problem := problem
3130fmt .Println (problem .Stat .FrontendQuestionId , "\t " + problem .Stat .QuestionTitle )
3231wg .Add (1 )
33- jobs <- & problem
32+ jobs <- problem
3433}
3534wg .Wait ()
3635}
3736
38- func worker (jobs <- chan * leetcode.StatStatusPairsType , wg * sync.WaitGroup ) {
37+ func worker (jobs <- chan leetcode.StatStatusPairsType , wg * sync.WaitGroup ) {
3938for problem := range jobs {
4039titleSlug := problem .Stat .QuestionTitleSlug
4140question := leetcode .QuestionData (titleSlug , false ).Data .Question
You can’t perform that action at this time.
0 commit comments