Skip to content

Commit

Permalink
Merge pull request #66 from yassinebenaid/remove-deprecated-functions
Browse files Browse the repository at this point in the history
remove deprecated functions
  • Loading branch information
yassinebenaid authored Aug 17, 2024
2 parents fb086fe + a6a134f commit 3378832
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 36 deletions.
10 changes: 5 additions & 5 deletions dumper.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ var DefaultTheme = Theme{
Braces: RGB{185, 86, 86},
}

// DisableColors disables the colors globally.
//
// Deprecated: As of v0.8.0 this function only sets the [DefaultTheme] to a zero value
func DisableColors() {
DefaultTheme = Theme{}
// Dump pretty prints `v` using the default Dumper options and the default theme
func Dump(v any) error {
return (&Dumper{
Theme: DefaultTheme,
}).Println(v)
}

// Dumper provides an elegant interface to pretty print any variable of any type in a colored and structured format.
Expand Down
6 changes: 6 additions & 0 deletions dumper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,12 @@ func TestDumperFprintReturnsAWriteErrorIfEncountered(t *testing.T) {
}
}

func TestDump(t *testing.T) {
if err := godump.Dump(nil); err != nil {
t.Fatalf("unexpected error returned by Dump")
}
}

func checkFromFeed(t *testing.T, result []byte, feedPath string) {
t.Helper()

Expand Down
31 changes: 0 additions & 31 deletions godump.go

This file was deleted.

0 comments on commit 3378832

Please sign in to comment.