2018-06-28 16:38:07 +03:00
|
|
|
package main
|
|
|
|
|
2018-10-17 16:39:02 +03:00
|
|
|
import (
|
2019-04-30 02:09:37 +03:00
|
|
|
"fmt"
|
2018-06-30 19:47:27 +03:00
|
|
|
|
2019-04-30 02:09:37 +03:00
|
|
|
"github.com/schollz/croc/v5/src/cli"
|
|
|
|
)
|
2018-06-30 19:47:27 +03:00
|
|
|
|
2018-09-22 06:51:43 +03:00
|
|
|
func main() {
|
2019-04-30 02:09:37 +03:00
|
|
|
// f, _ := os.Create("test.1")
|
|
|
|
// f.Truncate(8096)
|
|
|
|
// f.Close()
|
|
|
|
|
|
|
|
// file, _ := os.Open("test.1")
|
|
|
|
// defer file.Close()
|
|
|
|
|
|
|
|
// buffer := make([]byte, 4096)
|
|
|
|
// emptyBuffer := make([]byte, 4096)
|
|
|
|
// for {
|
|
|
|
// bytesread, err := file.Read(buffer)
|
|
|
|
// if err != nil {
|
|
|
|
// break
|
|
|
|
// }
|
|
|
|
// log.Debugln(bytes.Equal(buffer[:bytesread], emptyBuffer[:bytesread]))
|
|
|
|
// }
|
|
|
|
// var sender bool
|
|
|
|
// flag.BoolVar(&sender, "sender", false, "sender")
|
|
|
|
// flag.Parse()
|
|
|
|
// c, err := croc.New(sender, "foo")
|
|
|
|
// if err != nil {
|
|
|
|
// panic(err)
|
|
|
|
// }
|
|
|
|
// if sender {
|
|
|
|
// err = c.Send(croc.TransferOptions{
|
|
|
|
// // PathToFile: "../wskeystore/README.md",
|
|
|
|
// // PathToFile: "./src/croc/croc.go",
|
|
|
|
// // PathToFiles: []string{"C:\\Users\\zacks\\go\\src\\github.com\\schollz\\croc\\src\\croc\\croc.go", "croc.exe"},
|
|
|
|
// PathToFiles: []string{"croc2.exe", "croc3.exe"}, //,"croc2.exe", "croc3.exe"},
|
|
|
|
// //PathToFiles: []string{"README.md"}, //,"croc2.exe", "croc3.exe"},
|
|
|
|
// KeepPathInRemote: false,
|
|
|
|
// })
|
|
|
|
// } else {
|
|
|
|
// err = c.Receive()
|
|
|
|
// }
|
|
|
|
// if err != nil {
|
|
|
|
// fmt.Println(err)
|
|
|
|
// }
|
|
|
|
if err := cli.Run(); err != nil {
|
|
|
|
fmt.Println(err)
|
|
|
|
}
|
2018-09-22 08:25:01 +03:00
|
|
|
}
|