Skip to content

Commit

Permalink
[pager] Revert package changes
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed Dec 3, 2023
1 parent 9bff6b5 commit d7fdee3
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 25 deletions.
4 changes: 0 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
## Changelog

### 12.91.0

* `[pager]` Added method `Redirect`

### 12.90.1

* `[pager]` Use `more -f` by default
Expand Down
2 changes: 1 addition & 1 deletion ek.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
// ////////////////////////////////////////////////////////////////////////////////// //

// VERSION is current ek package version
const VERSION = "12.91.0"
const VERSION = "12.90.1"

// ////////////////////////////////////////////////////////////////////////////////// //

Expand Down
4 changes: 0 additions & 4 deletions pager/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,3 @@ func ExampleSetup() {
// in your main function.
defer Complete()
}

func ExampleRedirect() {
defer Redirect("less -MQR")
}
7 changes: 0 additions & 7 deletions pager/pager_posix.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,6 @@ func Complete() {
os.Stderr = stderr
}

// In most cases, you should use Setup and Complete because you can handle an
// error from Setup.
func Redirect(pager ...string) func() {
Setup(pager...)
return Complete
}

// ////////////////////////////////////////////////////////////////////////////////// //

// getPagerCommand creates command for pager
Expand Down
3 changes: 0 additions & 3 deletions pager/pager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ func (s *PagerSuite) TearDownSuite(c *C) {
}

func (s *PagerSuite) TestPager(c *C) {
Redirect()()
c.Assert(pagerCmd, IsNil)

c.Assert(Setup(), IsNil)
Complete()

Expand Down
6 changes: 0 additions & 6 deletions pager/pager_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,3 @@ func Setup(pager ...string) error {
func Complete() {
return
}

// ❗ In most cases, you should use Setup and Complete because you can handle an
// error from Setup.
func Redirect(pager ...string) func() {
return nil
}

0 comments on commit d7fdee3

Please sign in to comment.