Commit Graph

8 Commits

Author SHA1 Message Date
Bjørn Erik Pedersen cf95922e71 all: Run gofumpt -l -w . 2023-02-23 10:17:14 +01:00
Bjørn Erik Pedersen 52b64170ec Fix staticcheck lint errors 2022-07-14 14:33:54 +02:00
Michail Kargakis 90f4ffe95f
Gofmt the project 2020-04-10 23:59:22 +02:00
Francois Hill (fhill-wks) 3c4cfa198e Add `FullBaseFsPath` utility method
This method resolves the "Full" path of the `BasePathFs`. It also resolves for nested BasePaths.
Unit tests were also added
2016-04-20 14:12:23 +02:00
Bjørn Erik Pedersen 2f194a29d5 Add FileContainsAnyBytes 2016-02-17 11:33:17 +01:00
Bjørn Erik Pedersen 469e5f14dc Add tests for readerContains 2016-02-17 11:05:13 +01:00
Steve Francia 28bccc4ad0 reorder all utility functions to have fs as 1st param
This is a BREAKING CHANGE to the Walk and ReadDir functions that
existed prior to this branch addition. This change is not done without
considerable thought.

Having FS come first is done for two reasons.
1: It's more idiomatic go
2: It's more logical. It allows the function signature to read easier
and flow from the broadest value to the most narrow.

For example, WriteReader would read..
writeReader on this fs, to this path (on that fs),
with this data (at that path, on that fs).

I believe that when the first two were implemented it wasn't at all
obvious that the order wasn't correct, nevertheless, permitting a
lot of new functions defined in an incorrect or inconsistent order
seems like the worst option.

It was decided that a breaking change today would be best, even if it
was mildly painful at the present.
2015-12-08 16:26:39 -05:00
Steve Francia 90555c1894 reorganize utils into afero package 2015-12-08 16:26:38 -05:00