• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

fyne-io / fyne / 30240283751

27 Jul 2026 05:37AM UTC coverage: 59.896% (-0.02%) from 59.912%
30240283751

push

github

web-flow
Merge pull request #6440 from toaster/lint/trivial_checks

enable a couple of linter checks which only require trivial adjustments

589 of 969 new or added lines in 144 files covered. (60.78%)

14 existing lines in 10 files now uncovered.

27103 of 45250 relevant lines covered (59.9%)

815.37 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

10.0
/test/memcache.go
1
package test
2

3
import (
4
        "bytes"
5
        "errors"
6
        "io"
7
        "os"
8

9
        "fyne.io/fyne/v2"
10
        "fyne.io/fyne/v2/storage"
11
)
12

13
type memCache struct {
14
        memStore map[string][]byte
15
}
16

17
func makeCache() fyne.Cache {
35✔
18
        return &memCache{memStore: make(map[string][]byte)}
35✔
19
}
35✔
20

NEW
21
func (*memCache) RootURI() fyne.URI {
×
22
        return storage.NewFileURI(os.TempDir()) // in case anyone wants to manually handle storage
×
23
}
×
24

25
func (c *memCache) Exists(name string) bool {
×
26
        _, ok := c.memStore[name]
×
27
        return ok
×
28
}
×
29

30
func (c *memCache) Read(name string) (io.ReadCloser, error) {
×
31
        data, ok := c.memStore[name]
×
32
        if !ok {
×
33
                return nil, errors.New("not found")
×
34
        }
×
35

36
        return io.NopCloser(bytes.NewReader(data)), nil
×
37
}
38

39
func (c *memCache) Write(name string) (io.WriteCloser, error) {
×
40
        write := &bytes.Buffer{}
×
41

×
42
        return writeCloser{write, func() {
×
43
                c.memStore[name] = write.Bytes()
×
44
        }}, nil
×
45
}
46

47
func (c *memCache) Remove(name string) error {
×
48
        delete(c.memStore, name)
×
49
        return nil
×
50
}
×
51

52
type writeCloser struct {
53
        io.Writer
54

55
        onClose func()
56
}
57

58
func (c writeCloser) Close() error {
×
59
        c.onClose()
×
60
        return nil
×
61
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc