On Tue, Apr 8, 2014 at 4:54 PM, Pekka Enberg <notifications@github.com>wrote:

> In util/util.go:
>
> > @@ -26,3 +27,13 @@ func HomePath() string {
> >  func ID() string {
> >  	return fmt.Sprintf("i%v", time.Now().Unix())
> >  }
> > +
> > +func CopyFile(src, dst string) *exec.Cmd {
> > +	var cmd *exec.Cmd
> > +	if runtime.GOOS == "windows" {
> > +		cmd = exec.Command("cmd.exe", "/c", "copy", src, dst)
> > +	} else {
> > +		cmd = exec.Command("cp", src, dst)
> > +	}
> > +	return cmd
> > +}
>
> I'm OK with this but do you see any reason to use the standard library to
> implement this?
>
> There's various alternatives how to do that in this StackOverflow thread:
>
>
> http://stackoverflow.com/questions/21060945/simple-way-to-copy-a-file-in-golang
>

Of course the go native one is better. Mark this as TODO.


> —
> Reply to this email directly or view it on GitHub<https://github.com/cloudius-systems/capstan/pull/61/files#r11381405>
> .
>



-- 
Asias