Skip to content

Commit

Permalink
chore: gofmt -s -w .
Browse files Browse the repository at this point in the history
  • Loading branch information
soulteary committed Oct 10, 2022
1 parent 2f01bb7 commit 3647393
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion pkgs/httpcache/cachecontrol.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (cc CacheControl) Duration(key string) (time.Duration, error) {

func (cc CacheControl) String() string {
keys := make([]string, len(cc))
for k, _ := range cc {
for k := range cc {
keys = append(keys, k)
}
sort.Strings(keys)
Expand Down
14 changes: 7 additions & 7 deletions pkgs/vfs/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
// any VFS implementation, providing the same functionality than functions in the
// io/ioutil, os and path/filepath packages:
//
// io/ioutil.ReadFile => ReadFile
// io/ioutil.WriteFile => WriteFile
// os.IsExist => IsExist
// os.IsNotExist => IsNotExist
// os.MkdirAll => MkdirAll
// os.RemoveAll => RemoveAll
// path/filepath.Walk => Walk
// io/ioutil.ReadFile => ReadFile
// io/ioutil.WriteFile => WriteFile
// os.IsExist => IsExist
// os.IsNotExist => IsNotExist
// os.MkdirAll => MkdirAll
// os.RemoveAll => RemoveAll
// path/filepath.Walk => Walk
//
// All VFS implementations are thread safe, so multiple readers and writers might
// operate on them at any time.
Expand Down
8 changes: 4 additions & 4 deletions pkgs/vfs/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ func TarBzip2(r io.Reader) (VFS, error) {
// of the given filename, which must have one of the following
// extensions:
//
// - .zip
// - .tar
// - .tar.gz
// - .tar.bz2
// - .zip
// - .tar
// - .tar.gz
// - .tar.bz2
func Open(filename string) (VFS, error) {
file, err := os.Open(filepath.Clean(filename))
if err != nil {
Expand Down
8 changes: 4 additions & 4 deletions pkgs/vfs/vfs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ func TestMapFS(t *testing.T) {

func TestPopulatedMap(t *testing.T) {
files := map[string]*File{
"a/1": &File{},
"a/2": &File{},
"a/1": {},
"a/2": {},
}
fs, err := Map(files)
if err != nil {
Expand All @@ -163,8 +163,8 @@ func TestPopulatedMap(t *testing.T) {
func TestBadPopulatedMap(t *testing.T) {
// 1 can't be file and directory
files := map[string]*File{
"a/1": &File{},
"a/1/2": &File{},
"a/1": {},
"a/1/2": {},
}
_, err := Map(files)
if err == nil {
Expand Down

0 comments on commit 3647393

Please sign in to comment.