github.com/iikira/iikira-go-utils@v0.0.0-20230610031953-f2cb11cde33a/utils/checksum/checksum_test.go (about)

     1  package checksum
     2  
     3  import (
     4  	"fmt"
     5  )
     6  
     7  var (
     8  	flagList = []int{
     9  		CHECKSUM_MD5 | 000000000000000000000000000 | 00000000000000000000000,
    10  		000000000000000000000 | CHECKSUM_SLICE_MD5 | 00000000000000000000000,
    11  		000000000000000000000 | 000000000000000000000000000 | CHECKSUM_CRC32,
    12  		CHECKSUM_MD5 | CHECKSUM_SLICE_MD5 | 00000000000000000000000,
    13  		000000000000000000000 | CHECKSUM_SLICE_MD5 | CHECKSUM_CRC32,
    14  		CHECKSUM_MD5 | 000000000000000000000000000 | CHECKSUM_CRC32,
    15  		CHECKSUM_MD5 | CHECKSUM_SLICE_MD5 | CHECKSUM_CRC32,
    16  	}
    17  )
    18  
    19  func printFileMeta(meta *LocalFileMeta) {
    20  	fmt.Printf("slicemd5: %x, md5: %x, crc32: %x %d\n", meta.SliceMD5, meta.MD5, meta.CRC32, meta.CRC32)
    21  }