mirror of
				https://github.com/byReqz/go-etcher.git
				synced 2025-11-04 00:31:31 +00:00 
			
		
		
		
	Compare commits
	
		
			3 Commits
		
	
	
		
			0.0.3
			...
			d0f0957932
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					
						
						
							
						
						d0f0957932
	
				 | 
					
					
						||
| 
						 | 
					
						
						
							
						
						17bb76627f
	
				 | 
					
					
						||
| 
						 | 
					
						
						
							
						
						427c4fd990
	
				 | 
					
					
						
							
								
								
									
										7
									
								
								.github/workflows/lint.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								.github/workflows/lint.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
name: ci
 | 
			
		||||
 | 
			
		||||
on: [push]
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  test:
 | 
			
		||||
    uses: byReqz/workflows/.github/workflows/golint_with_codeql.yml@main
 | 
			
		||||
							
								
								
									
										27
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								main.go
									
									
									
									
									
								
							@@ -1,19 +1,20 @@
 | 
			
		||||
package main
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"crypto/sha256"
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"os"
 | 
			
		||||
	ac "github.com/JoaoDanielRufino/go-input-autocomplete"
 | 
			
		||||
	"github.com/briandowns/spinner"
 | 
			
		||||
	"github.com/fatih/color"
 | 
			
		||||
	"github.com/schollz/progressbar/v3"
 | 
			
		||||
	flag "github.com/spf13/pflag"
 | 
			
		||||
	"io"
 | 
			
		||||
	"time"
 | 
			
		||||
	"log"
 | 
			
		||||
	"strings"
 | 
			
		||||
	"os"
 | 
			
		||||
	"runtime"
 | 
			
		||||
	"strconv"
 | 
			
		||||
	"crypto/sha256"
 | 
			
		||||
	"github.com/schollz/progressbar/v3"
 | 
			
		||||
	"github.com/fatih/color"
 | 
			
		||||
	"github.com/briandowns/spinner"
 | 
			
		||||
	flag "github.com/spf13/pflag"
 | 
			
		||||
	ac "github.com/JoaoDanielRufino/go-input-autocomplete"
 | 
			
		||||
	"strings"
 | 
			
		||||
	"time"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var device string
 | 
			
		||||
@@ -179,7 +180,7 @@ func main() {
 | 
			
		||||
		inputsize = statinput.Size()
 | 
			
		||||
		inputisblock = false
 | 
			
		||||
	} else {
 | 
			
		||||
		inputsize, err = image.Seek(0, io.SeekEnd)
 | 
			
		||||
		inputsize, _ = image.Seek(0, io.SeekEnd)
 | 
			
		||||
		inputisblock = true
 | 
			
		||||
		_, _ = image.Seek(0, 0)
 | 
			
		||||
	}
 | 
			
		||||
@@ -222,19 +223,19 @@ func main() {
 | 
			
		||||
	devicemb := fmt.Sprint("[", targetsize/1024/1024, "MB]")
 | 
			
		||||
	var inputblock string
 | 
			
		||||
	var targetblock string
 | 
			
		||||
	if inputisblock == true {
 | 
			
		||||
	if inputisblock {
 | 
			
		||||
		inputblock = "[Blockdevice]"
 | 
			
		||||
	} else {
 | 
			
		||||
		inputblock = "[File]"
 | 
			
		||||
	}
 | 
			
		||||
	if targetisblock == true {
 | 
			
		||||
	if targetisblock {
 | 
			
		||||
		targetblock = "[Blockdevice]"
 | 
			
		||||
	} else {
 | 
			
		||||
		targetblock = "[File]"
 | 
			
		||||
	}
 | 
			
		||||
	fmt.Println("[", color.BlueString("i"), "]  Input device/file: "+input, inputmb, inputblock)
 | 
			
		||||
	fmt.Println("[", color.BlueString("i"), "]  Output device/file: "+device, devicemb, targetblock)
 | 
			
		||||
	if force == false {
 | 
			
		||||
	if !force {
 | 
			
		||||
		if inputsize > targetsize {
 | 
			
		||||
			fmt.Println("[", color.RedString("w"), "]", color.RedString(" Warning:"), "Input file seems to be bigger than the destination!")
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user