go-bsdp

command module
v0.0.0-...-df2ffe8 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2017 License: MIT Imports: 4 Imported by: 0

README

go-bsdp

An binary diff&patch library based on bsdiff algorithm(v4.3) for Go

Installation

go get -v github.com/tsyeyuanfeng/go-bsdp/...

API

package main

import (
    "os"
    "github.com/tsyeyuanfeng/go-bsdp/bsdp"
)

const (
    oldFilePath = "your old file path"
    newFilePath = "your new file path"
    patchFilePath = "your patch file path"
)

func main() {
    // Generate patch
    bsdp.Diff(oldFilePath, newFilePath, patchFilePath)

    // Apply patch
    bsdp.patch(oldFilePath, newFilePath, patchFilePath)
}

Command line tool

# Generate patch
go-bsdp diff "old file" "new file" "patch file"

# Apply patch
go-bsdp patch "old file" "new file" "patch file"

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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