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

echocat / caretakerd / 13988158533

21 Mar 2025 09:01AM UTC coverage: 8.837% (-1.3%) from 10.12%
13988158533

push

github

web-flow
Bump github.com/tdewolff/minify/v2 from 2.21.3 to 2.22.3 (#65)

* Bump github.com/tdewolff/minify/v2 from 2.21.3 to 2.22.3

Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.21.3 to 2.22.3.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.21.3...v2.22.3)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Adjust used go dependencies

* Adjust used go dependencies

* Adjust used go dependencies

* Adjusted to latest changes

* Adjusted to latest changes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gregor Noczinski <gregor@noczinski.eu>

544 of 6156 relevant lines covered (8.84%)

2.67 hits per line

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

0.0
/stack/stack.go
1
package stack
2

3
import (
4
        "fmt"
5
        "path/filepath"
6
        "runtime"
7
        "strings"
8
)
9

10
var (
11
        unknownFunction = string("<unknown function>")
12
        runtimeMain     = string("runtime.main")
13
        runtimeGoexit   = string("runtime.goexit")
14
)
15

16
// Element represents an element from the whole stack trace.
17
type Element struct {
18
        File      string
19
        ShortFile string
20
        Line      int
21
        Function  string
22
        Package   string
23
        Pc        uintptr
24
}
25

26
func (i Element) String() string {
×
27
        return fmt.Sprintf("%s.%s(%s:%d)", i.Package, i.Function, i.ShortFile, i.Line)
×
28
}
×
29

30
// Stack represents the whole stack trace with a couple of Elements.
31
type Stack []Element
32

33
func (i Stack) String() string {
×
34
        result := ""
×
35
        for _, element := range i {
×
36
                result += "\tat " + element.String() + "\n"
×
37
        }
×
38
        return result
×
39
}
40

41
// CaptureStack creates a new stack capture of the current stack.
42
// It is possible to cut off the returned stack with framesToSkip.
43
func CaptureStack(framesToSkip int) Stack {
×
44
        result := Stack{}
×
45
        valid := true
×
46
        for i := framesToSkip + 1; valid; i++ {
×
47
                pc, file, line, ok := runtime.Caller(i)
×
48
                if ok {
×
49
                        fullFunctionName := fullFunctionNameOf(pc)
×
50
                        if fullFunctionName == runtimeMain || fullFunctionName == runtimeGoexit {
×
51
                                valid = false
×
52
                        } else {
×
53
                                result = append(result, Element{
×
54
                                        File:      file,
×
55
                                        ShortFile: filepath.Base(file),
×
56
                                        Line:      line,
×
57
                                        Function:  functionNameOf(fullFunctionName),
×
58
                                        Package:   packageNameOf(fullFunctionName),
×
59
                                        Pc:        pc,
×
60
                                })
×
61
                        }
×
62
                } else {
×
63
                        valid = false
×
64
                }
×
65
        }
66
        return result
×
67
}
68

69
func functionNameOf(fullFunctionName string) string {
×
70
        lastDot := strings.LastIndex(fullFunctionName, ".")
×
71
        if lastDot >= 0 && lastDot+1 < len(fullFunctionName) {
×
72
                return fullFunctionName[lastDot+1:]
×
73
        }
×
74
        return fullFunctionName
×
75
}
76

77
func packageNameOf(fullFunctionName string) string {
×
78
        lastDot := strings.LastIndex(fullFunctionName, ".")
×
79
        if lastDot > 0 {
×
80
                return fullFunctionName[:lastDot]
×
81
        }
×
82
        return ""
×
83
}
84

85
func fullFunctionNameOf(pc uintptr) string {
×
86
        fn := runtime.FuncForPC(pc)
×
87
        if fn == nil {
×
88
                return unknownFunction
×
89
        }
×
90
        return fn.Name()
×
91
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc