diffkit

package module
v0.0.0-...-ee91268 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: ISC Imports: 0 Imported by: 0

README

diffkit

GoDoc Go Report Card License Go version

Convenience functions to help you find differences. Fully tested and no external dependencies.

Installation

In your Golang project, please run:

go get github.com/bartmika/diffkit

Documentation

All documentation can be found here.

Example Usage

package main

import (
    "fmt"

    "github.com/bartmika/diffkit"

    func main(){
        // Sample data.
    	oldArr := []uint64{1, 2, 3, 4, 5}
    	newArr := []uint64{1, 2, 6, 7, 8, 9, 10}

    	// See what differences between the two arrays.
    	addedArr, sameArr, removedArr := Uints64(oldArr, newArr)

    	// Correct results shown in comments.
        fmt.Println(addedArr)   // 6, 7, 8, 9, 10
        fmt.Println(sameArr)    // 1, 2
        fmt.Println(removedArr) // 3, 4, 5
    }
)

Contributing

Found a bug? Want a feature to improve your developer experience when finding the difference? Please create an issue.

License

Made with ❤️ by Bartlomiej Mika.
The project is licensed under the ISC License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Uints64

func Uints64(originalArr []uint64, changeArr []uint64) (addedArr, sameArr, removedArr []uint64)

Uints64 Function takes the original array and compare it with the change array to return three arrays: (1) Array with new values added to original array. (2) Array with values not changed between original and change array. (3) Array with values removed from original array.

Types

This section is empty.

Jump to

Keyboard shortcuts

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