Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dirs #46

Merged
merged 7 commits into from
Aug 21, 2018
Merged

Dirs #46

merged 7 commits into from
Aug 21, 2018

Conversation

tgulacsi
Copy link
Contributor

@tgulacsi tgulacsi commented Aug 4, 2018

Add directories and ReadFile.

Copy link
Owner

@rakyll rakyll left a comment

Choose a reason for hiding this comment

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

Few comments, thanks much!

README.md Outdated
@@ -2,6 +2,8 @@

[![Build Status](https://travis-ci.org/rakyll/statik.svg?branch=master)](https://travis-ci.org/rakyll/statik)

This is a fork of github.com/rakyll/statik - I wanted working Readdir.
Copy link
Owner

Choose a reason for hiding this comment

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

Remove this line please.

fs/walk.go Outdated
@@ -0,0 +1,97 @@
// Copyright 2018 Tamás Gulácsi. All Rights Reserved.
Copy link
Owner

Choose a reason for hiding this comment

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

Revert the license header to the previous.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file is totally new, but I don't object.

fs/walk.go Outdated
"path"
)

var SkipDir = errors.New("skip dir")
Copy link
Owner

Choose a reason for hiding this comment

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

Be more

var DirectorySkippedError

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What about using filepath.SkipDir?
I copied filepath.WalkFunc and filepath.SkipDir, you suggested just referencing it - keep it consistent, and use filepath.SkipDir.

fs/walk.go Outdated
// Walk skips the directory's contents entirely.
// If the function returns SkipDir when invoked on a non-directory file,
// Walk skips the remaining files in the containing directory.
type WalkFunc func(path string, info os.FileInfo, err error) error
Copy link
Owner

Choose a reason for hiding this comment

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

What about just using filepath.WalkFunc instead of introducing this type?

- remove "fork" comment from README
- revert change of licensing in fs/walk.go
- fix fs/ tests for directories.
Copy link
Owner

@rakyll rakyll left a comment

Choose a reason for hiding this comment

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

Thanks!

@rakyll rakyll merged commit aa8a7b1 into rakyll:master Aug 21, 2018
Keats pushed a commit to Keats/statik that referenced this pull request Oct 3, 2018
A recent patch broke (rakyll#46) broke go get
using versions of Go older than 1.10 as it is
using the newly introduced FileHeader.Modified

This patch replaces the .Modified by a call to the
deprecated SetModTime to maintain compatibility.

Fix rakyll#50
@Keats Keats mentioned this pull request Oct 3, 2018
rakyll pushed a commit that referenced this pull request Nov 28, 2018
A recent patch broke (#46) broke go get
using versions of Go older than 1.10 as it is
using the newly introduced FileHeader.Modified

This patch replaces the .Modified by a call to the
deprecated SetModTime to maintain compatibility.

Fix #50
ekanna pushed a commit to ekanna/statik that referenced this pull request Sep 12, 2019
ekanna pushed a commit to ekanna/statik that referenced this pull request Sep 12, 2019
A recent patch broke (rakyll#46) broke go get
using versions of Go older than 1.10 as it is
using the newly introduced FileHeader.Modified

This patch replaces the .Modified by a call to the
deprecated SetModTime to maintain compatibility.

Fix rakyll#50
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.

None yet

2 participants