mirror of
				https://github.com/fumiama/RVC-Models-Downloader.git
				synced 2025-11-04 12:55:08 +09:00 
			
		
		
		
	fix: notui
This commit is contained in:
		
							parent
							
								
									f79b3a3a5e
								
							
						
					
					
						commit
						77dc207adf
					
				
							
								
								
									
										10
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								main.go
									
									
									
									
									
								
							@ -6,6 +6,7 @@ import (
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"os"
 | 
			
		||||
	"runtime"
 | 
			
		||||
	"sync"
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	"github.com/fumiama/terasu/dns"
 | 
			
		||||
@ -57,7 +58,10 @@ func main() {
 | 
			
		||||
	}
 | 
			
		||||
	ctx, cancel := context.WithCancel(context.Background())
 | 
			
		||||
	defer cancel()
 | 
			
		||||
	wg := sync.WaitGroup{}
 | 
			
		||||
	wg.Add(1)
 | 
			
		||||
	go func() {
 | 
			
		||||
		defer wg.Done()
 | 
			
		||||
		if *dnsf != "" {
 | 
			
		||||
			f, err := os.Open(*dnsf)
 | 
			
		||||
			if err != nil {
 | 
			
		||||
@ -99,5 +103,9 @@ func main() {
 | 
			
		||||
			logrus.Warnln("download canceled")
 | 
			
		||||
		}
 | 
			
		||||
	}()
 | 
			
		||||
	sc.show(time.Second)
 | 
			
		||||
	if notui {
 | 
			
		||||
		wg.Wait()
 | 
			
		||||
	} else {
 | 
			
		||||
		sc.show(time.Second)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user