Skip to content

Commit 2d67bc0

Browse files
claudemrjoshuak
authored andcommitted
Enhance code quality and testing infrastructure
Code improvements: - Remove unused ErrNotImplemented variable and github.com/pkg/errors dependency - Add comprehensive package-level documentation - Fix comment punctuation for consistency (Chtimes, Chown) Testing: - Add comprehensive test suite covering all filesystem methods - Tests for: Mkdir, MkdirAll, OpenFile, Open, Remove, RemoveAll, Stat, Chmod, Chtimes, Chown - Edge case coverage including error conditions Repository management: - Add Dependabot configuration for automated dependency updates - Add CODEOWNERS file for PR review assignments
1 parent bd4f4e7 commit 2d67bc0

File tree

6 files changed

+415
-9
lines changed

6 files changed

+415
-9
lines changed

.github/CODEOWNERS

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Code owners for httpfs repository
2+
# These owners will be automatically requested for review when someone opens a pull request.
3+
4+
# Default owners for everything in the repo
5+
* @absfs/maintainers
6+
7+
# Go source code
8+
*.go @absfs/maintainers
9+
10+
# CI/CD workflows
11+
.github/ @absfs/maintainers

.github/dependabot.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: 2
2+
updates:
3+
# Enable version updates for Go modules
4+
- package-ecosystem: "gomod"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
open-pull-requests-limit: 10
9+
labels:
10+
- "dependencies"
11+
- "go"
12+
13+
# Enable version updates for GitHub Actions
14+
- package-ecosystem: "github-actions"
15+
directory: "/"
16+
schedule:
17+
interval: "weekly"
18+
open-pull-requests-limit: 5
19+
labels:
20+
- "dependencies"
21+
- "github-actions"

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ go 1.23
55
require (
66
github.com/absfs/absfs v0.0.0-20251109181304-77e2f9ac4448
77
github.com/absfs/memfs v0.0.0-20251122223403-0826c6ce3884
8-
github.com/pkg/errors v0.9.1
98
)
109

1110
require github.com/absfs/inode v0.0.0-20190804195220-b7cd14cdd0dc // indirect

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ
1414
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
1515
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
1616
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
17-
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
18-
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
1917
github.com/xtgo/set v1.0.0 h1:6BCNBRv3ORNDQ7fyoJXRv+tstJz3m1JVFQErfeZz2pY=
2018
github.com/xtgo/set v1.0.0/go.mod h1:d3NHzGzSa0NmB2NhFyECA+QdRp29oEn2xbT+TpeFoM8=
2119
golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=

httpfs.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Package httpfs implements a net/http FileSystem interface compatible
2+
// wrapper around absfs.Filer that supports both read and write operations.
3+
// It bridges the gap between the absfs filesystem abstraction and Go's
4+
// standard http.FileServer.
15
package httpfs
26

37
import (
@@ -7,13 +11,9 @@ import (
711
"strings"
812
"time"
913

10-
"github.com/pkg/errors"
11-
1214
"github.com/absfs/absfs"
1315
)
1416

15-
var ErrNotImplemented = errors.New("not implemented")
16-
1717
type Httpfs struct {
1818
fs absfs.Filer
1919
}
@@ -112,12 +112,12 @@ func (filer *Httpfs) Chmod(name string, mode os.FileMode) error {
112112
return filer.fs.Chmod(name, mode)
113113
}
114114

115-
// Chtimes changes the access and modification times of the named file
115+
// Chtimes changes the access and modification times of the named file.
116116
func (filer *Httpfs) Chtimes(name string, atime time.Time, mtime time.Time) error {
117117
return filer.fs.Chtimes(name, atime, mtime)
118118
}
119119

120-
// Chown changes the owner and group ids of the named file
120+
// Chown changes the owner and group ids of the named file.
121121
func (filer *Httpfs) Chown(name string, uid, gid int) error {
122122
return filer.fs.Chown(name, uid, gid)
123123
}

0 commit comments

Comments
 (0)