mirror of
https://github.com/peco/peco.git
synced 2026-09-10 07:16:29 -04:00
Actually generate the stringer files
Previously I had manually created a stringer.go file from the output of stringer command, because I had problems running it properly on my environment for various reasons. Taking a fresh look, this is no longer a problem, so I'm opting to actually generate it manually. Adds ScrollFirstItem and ScrollLastItem constants
This commit is contained in:
parent
a47c6ca159
commit
972ecec7a2
3
peco.go
3
peco.go
|
|
@ -1,3 +1,6 @@
|
|||
//go:generate stringer -type PagingRequestType -output stringer_paging_request_type.go .
|
||||
//go:generate stringer -type VerticalAnchor -output stringer_vertical_anchor.go .
|
||||
|
||||
package peco
|
||||
|
||||
import (
|
||||
|
|
|
|||
26
stringer.go
26
stringer.go
|
|
@ -1,26 +0,0 @@
|
|||
package peco
|
||||
|
||||
import "fmt"
|
||||
|
||||
const _PagingRequestType_name = "ToLineAboveToScrollPageDownToLineBelowToScrollPageUpToScrollLeftToScrollRightToLineInPage"
|
||||
|
||||
var _PagingRequestType_index = [...]uint8{0, 11, 27, 38, 52, 64, 77, 89}
|
||||
|
||||
func (i PagingRequestType) String() string {
|
||||
if i < 0 || i >= PagingRequestType(len(_PagingRequestType_index)-1) {
|
||||
return fmt.Sprintf("PagingRequestType(%d)", i)
|
||||
}
|
||||
return _PagingRequestType_name[_PagingRequestType_index[i]:_PagingRequestType_index[i+1]]
|
||||
}
|
||||
|
||||
const _VerticalAnchor_name = "AnchorTopAnchorBottom"
|
||||
|
||||
var _VerticalAnchor_index = [...]uint8{0, 9, 21}
|
||||
|
||||
func (i VerticalAnchor) String() string {
|
||||
i -= 1
|
||||
if i < 0 || i >= VerticalAnchor(len(_VerticalAnchor_index)-1) {
|
||||
return fmt.Sprintf("VerticalAnchor(%d)", i+1)
|
||||
}
|
||||
return _VerticalAnchor_name[_VerticalAnchor_index[i]:_VerticalAnchor_index[i+1]]
|
||||
}
|
||||
16
stringer_paging_request_type.go
Normal file
16
stringer_paging_request_type.go
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// Code generated by "stringer -type PagingRequestType -output stringer_paging_request_type.go ."; DO NOT EDIT.
|
||||
|
||||
package peco
|
||||
|
||||
import "fmt"
|
||||
|
||||
const _PagingRequestType_name = "ToLineAboveToScrollPageDownToLineBelowToScrollPageUpToScrollLeftToScrollRightToLineInPageToScrollFirstItemToScrollLastItem"
|
||||
|
||||
var _PagingRequestType_index = [...]uint8{0, 11, 27, 38, 52, 64, 77, 89, 106, 122}
|
||||
|
||||
func (i PagingRequestType) String() string {
|
||||
if i < 0 || i >= PagingRequestType(len(_PagingRequestType_index)-1) {
|
||||
return fmt.Sprintf("PagingRequestType(%d)", i)
|
||||
}
|
||||
return _PagingRequestType_name[_PagingRequestType_index[i]:_PagingRequestType_index[i+1]]
|
||||
}
|
||||
17
stringer_vertical_anchor.go
Normal file
17
stringer_vertical_anchor.go
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// Code generated by "stringer -type VerticalAnchor -output stringer_vertical_anchor.go ."; DO NOT EDIT.
|
||||
|
||||
package peco
|
||||
|
||||
import "fmt"
|
||||
|
||||
const _VerticalAnchor_name = "AnchorTopAnchorBottom"
|
||||
|
||||
var _VerticalAnchor_index = [...]uint8{0, 9, 21}
|
||||
|
||||
func (i VerticalAnchor) String() string {
|
||||
i -= 1
|
||||
if i < 0 || i >= VerticalAnchor(len(_VerticalAnchor_index)-1) {
|
||||
return fmt.Sprintf("VerticalAnchor(%d)", i+1)
|
||||
}
|
||||
return _VerticalAnchor_name[_VerticalAnchor_index[i]:_VerticalAnchor_index[i+1]]
|
||||
}
|
||||
Loading…
Reference in a new issue