mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-03 00:57:52 +02:00
resetting controllers on new repo
This commit is contained in:
go.modgo.summain.gomodules.txt
pkg
app
cheatsheet
gui
branches_panel.gocommit_files_panel.gocommits_panel.go
controllers
files_controller.gofiles_helper.golocal_commits_controller.gorefs_helper.gosuggestions_helper.gotypes.goworking_tree_helper.go
diffing.godummies.gofiltering_menu_panel.gogui.gogui_test.gokeybindings.golayout.goline_by_line_panel.golist_context_config.gomisc.gomodes.gopatch_options_panel.gopull_request_menu_panel.gorecent_repos_panel.goreflog_panel.gorefresh.goremote_branches_panel.goremotes_panel.gostash_panel.gostatus_panel.gosub_commits_panel.gosubmodules_panel.gotypes
workspace_reset_options_panel.govendor
github.com
golang.org
x
sys
unix
zerrors_linux.gozerrors_linux_386.gozerrors_linux_amd64.gozerrors_linux_arm.gozerrors_linux_arm64.gozerrors_linux_mips.gozerrors_linux_mips64.gozerrors_linux_mips64le.gozerrors_linux_mipsle.gozerrors_linux_ppc.gozerrors_linux_ppc64.gozerrors_linux_ppc64le.gozerrors_linux_riscv64.gozerrors_linux_s390x.gozerrors_linux_sparc64.gozsysnum_linux_386.gozsysnum_linux_amd64.gozsysnum_linux_arm.gozsysnum_linux_arm64.gozsysnum_linux_mips.gozsysnum_linux_mips64.gozsysnum_linux_mips64le.gozsysnum_linux_mipsle.gozsysnum_linux_ppc.gozsysnum_linux_ppc64.gozsysnum_linux_ppc64le.gozsysnum_linux_riscv64.gozsysnum_linux_s390x.gozsysnum_linux_sparc64.goztypes_linux.go
windows
1
vendor/github.com/go-errors/errors/README.md
generated
vendored
1
vendor/github.com/go-errors/errors/README.md
generated
vendored
@ -79,3 +79,4 @@ This package is licensed under the MIT license, see LICENSE.MIT for details.
|
||||
> ```
|
||||
* v1.4.0 *BREAKING* v1.4.0 reverted all changes from v1.3.0 and is identical to v1.2.0
|
||||
* v1.4.1 no code change, but now without an unnecessary cover.out file.
|
||||
* v1.4.2 performance improvement to ErrorStack() to avoid unnecessary work https://github.com/go-errors/errors/pull/40
|
||||
|
14
vendor/github.com/go-errors/errors/stackframe.go
generated
vendored
14
vendor/github.com/go-errors/errors/stackframe.go
generated
vendored
@ -53,7 +53,7 @@ func (frame *StackFrame) Func() *runtime.Func {
|
||||
func (frame *StackFrame) String() string {
|
||||
str := fmt.Sprintf("%s:%d (0x%x)\n", frame.File, frame.LineNumber, frame.ProgramCounter)
|
||||
|
||||
source, err := frame.SourceLine()
|
||||
source, err := frame.sourceLine()
|
||||
if err != nil {
|
||||
return str
|
||||
}
|
||||
@ -63,13 +63,21 @@ func (frame *StackFrame) String() string {
|
||||
|
||||
// SourceLine gets the line of code (from File and Line) of the original source if possible.
|
||||
func (frame *StackFrame) SourceLine() (string, error) {
|
||||
source, err := frame.sourceLine()
|
||||
if err != nil {
|
||||
return source, New(err)
|
||||
}
|
||||
return source, err
|
||||
}
|
||||
|
||||
func (frame *StackFrame) sourceLine() (string, error) {
|
||||
if frame.LineNumber <= 0 {
|
||||
return "???", nil
|
||||
}
|
||||
|
||||
file, err := os.Open(frame.File)
|
||||
if err != nil {
|
||||
return "", New(err)
|
||||
return "", err
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
@ -82,7 +90,7 @@ func (frame *StackFrame) SourceLine() (string, error) {
|
||||
currentLine++
|
||||
}
|
||||
if err := scanner.Err(); err != nil {
|
||||
return "", New(err)
|
||||
return "", err
|
||||
}
|
||||
|
||||
return "???", nil
|
||||
|
Reference in New Issue
Block a user