Answers for "how to find diffeence between tow file paths in golang"

Go
0

how to find diffeence between tow file paths in golang

package main
import (
  "io/ioutil"
  "bytes"
  "fmt"
)
func main(){
  one, err := ioutil.ReadFile("one.txt")
  if err != nil{
    panic(err)
  }
  two, err2 := ioutil.ReadFile("two.txt")
  if err2 != nil{
    panic(err2)
  }
  same := bytes.Equal(one, two)
  fmt.Println(same)
}
Posted by: Guest on September-23-2020

Code answers related to "how to find diffeence between tow file paths in golang"

Browse Popular Code Answers by Language