mirror of
				https://github.com/byReqz/go-etcher.git
				synced 2025-11-04 08:41:30 +00:00 
			
		
		
		
	add spacing
This commit is contained in:
		
							
								
								
									
										9
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								main.go
									
									
									
									
									
								
							@@ -82,14 +82,14 @@ func Sync(image *os.File, target *os.File) error {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
func main() {
 | 
					func main() {
 | 
				
			||||||
	s := spinner.New(spinner.CharSets[14], 100*time.Millisecond)
 | 
						s := spinner.New(spinner.CharSets[14], 100*time.Millisecond)
 | 
				
			||||||
	s.Prefix = "[ "
 | 
					 | 
				
			||||||
	s.Suffix = " ]  Getting file details"
 | 
					 | 
				
			||||||
	// s.Start()	
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// if not given via arg
 | 
						// if not given via arg
 | 
				
			||||||
	path := GetPath()
 | 
						path := GetPath()
 | 
				
			||||||
	// if not given via arg
 | 
						// if not given via arg
 | 
				
			||||||
	dest := GetDest()
 | 
						dest := GetDest()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						s.Prefix = "[ "
 | 
				
			||||||
 | 
						s.Suffix = " ]  Getting file details"
 | 
				
			||||||
	s.Start()
 | 
						s.Start()
 | 
				
			||||||
	stat, err := os.Stat(path)
 | 
						stat, err := os.Stat(path)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
@@ -100,6 +100,7 @@ func main() {
 | 
				
			|||||||
		s.Stop()
 | 
							s.Stop()
 | 
				
			||||||
		fmt.Println("\r[", color.GreenString("✓"), "]  Getting file details                     ")
 | 
							fmt.Println("\r[", color.GreenString("✓"), "]  Getting file details                     ")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	s.Prefix = "[ "
 | 
						s.Prefix = "[ "
 | 
				
			||||||
	s.Suffix = " ]  Opening files"
 | 
						s.Suffix = " ]  Opening files"
 | 
				
			||||||
	s.Start()
 | 
						s.Start()
 | 
				
			||||||
@@ -132,7 +133,7 @@ func main() {
 | 
				
			|||||||
	s.Prefix = "[ "
 | 
						s.Prefix = "[ "
 | 
				
			||||||
	s.Suffix = " ]  Syncing"
 | 
						s.Suffix = " ]  Syncing"
 | 
				
			||||||
	s.Start()
 | 
						s.Start()
 | 
				
			||||||
	Sync(image, target)
 | 
						err = Sync(image, target)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		s.Stop()
 | 
							s.Stop()
 | 
				
			||||||
		fmt.Println("\r[", color.RedString("✘"), "]  Syncing                    ")
 | 
							fmt.Println("\r[", color.RedString("✘"), "]  Syncing                    ")
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user