filecomparator

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2021 License: MIT Imports: 4 Imported by: 0

README

filecomparator

Compares two files are equal or not.

Project FUSO

File Utils for Simple Objectives

Compare Files in multiple ways

filecomparator can tell two files are same or not. it compares files with md5 hash values, sha1 values and other original compare methods.

file compare methods

  • MD5
  • sha1
  • other

Examples

create a instance with New method and call a method you want to compare files with.

	// create file path string
	user, _ := user.Current()
	file1 := user.HomeDir + `/512.zip`
	file2 := user.HomeDir + `/512.zip`

	comp := filecomparator.New()
	result, _ := comp.CompareMD5(file1, file2)

	// result is true since same file are compared.
	t.Log(result)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *comparator

New returns new comparator instance

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL