Skip to content

docs: add File funcs examples#129

Merged
shoenig merged 2 commits intoshoenig:mainfrom
alessio-perugini:feature/add-file-examples
May 8, 2023
Merged

docs: add File funcs examples#129
shoenig merged 2 commits intoshoenig:mainfrom
alessio-perugini:feature/add-file-examples

Conversation

@alessio-perugini
Copy link
Copy Markdown
Contributor

@alessio-perugini alessio-perugini commented May 6, 2023

#123
Yet another day with some more examples 🤓
Lemme know if the example are clear enough I'm not 💯 convinced about FileContainsFS(t, os.DirFS(os.TempDir()), fName, "bar") might be less clear than FileContainsFS(t, "/tmp", "fileName, "bar") WDYT?

@shoenig
Copy link
Copy Markdown
Owner

shoenig commented May 7, 2023

Actually yeah @alessio-perugini that explicit name form really helps drive home the fact that only the Base is expected - a gotcha that both myself and a coworker fell for 😬 . Since the examples file is already guarded with a unix build tag it's probably okay to just reference /tmp directly

@alessio-perugini alessio-perugini force-pushed the feature/add-file-examples branch 2 times, most recently from bce5edc to 7f5df57 Compare May 7, 2023 19:44
@alessio-perugini alessio-perugini force-pushed the feature/add-file-examples branch from 7f5df57 to f1f124c Compare May 7, 2023 19:45
@alessio-perugini
Copy link
Copy Markdown
Contributor Author

Actually yeah @alessio-perugini that explicit name form really helps drive home the fact that only the Base is expected - a gotcha that both myself and a coworker fell for grimacing . Since the examples file is already guarded with a unix build tag it's probably okay to just reference /tmp directly

Thx for the feedback. You can check the new outcome in the latest commit 🤓

Copy link
Copy Markdown
Owner

@shoenig shoenig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; thanks again @alessio-perugini!

@shoenig shoenig merged commit 0b3064f into shoenig:main May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants