yamldiff icon indicating copy to clipboard operation
yamldiff copied to clipboard

Is the stat(...) call really necessary?

Open JensRantil opened this issue 3 years ago • 0 comments

From what I understand, stat(...) is only used to check that a file exist. But really, https://github.com/sahilm/yamldiff/blob/3a067f14615afd8347b396a24cd800810bcec41f/main.go#L45-L52 will fail if any of the files don't exist. Additionally, https://github.com/sahilm/yamldiff/blob/master/main.go#L80 will fail in other ways, such as read permissions being incorrect.

JensRantil avatar Jan 19 '21 19:01 JensRantil