Skip to content

Commit

Permalink
Add GetOptions function and update project version
Browse files Browse the repository at this point in the history
Introduced a new function called GetOptions in core.go file which returns the current global options configuration. In addition, updated the project version to v1.3.4 in the README.md file.
  • Loading branch information
Gabriel Cataldo committed May 15, 2024
1 parent 5c12d12 commit df5db83
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ go-logger
=================
<img align="right" src="gopher-logger.png" alt="">

[![Project status](https://img.shields.io/badge/version-v1.3.2-vividgreen.svg)](https://github.com/GabrielHCataldo/go-logger/releases/tag/v1.3.2)
[![Project status](https://img.shields.io/badge/version-v1.3.4-vividgreen.svg)](https://github.com/GabrielHCataldo/go-logger/releases/tag/v1.3.4)
[![Go Report Card](https://goreportcard.com/badge/github.com/GabrielHCataldo/go-logger)](https://goreportcard.com/report/github.com/GabrielHCataldo/go-logger)
[![Coverage Status](https://coveralls.io/repos/GabrielHCataldo/go-logger/badge.svg?branch=main&service=github)](https://coveralls.io/github/GabrielHCataldo/go-logger?branch=main)
[![Open Source Helpers](https://www.codetriage.com/gabrielhcataldo/go-logger/badges/users.svg)](https://www.codetriage.com/gabrielhcataldo/go-logger)
Expand Down
10 changes: 10 additions & 0 deletions logger/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ func SetOptions(options *Options) {
}
}

// GetOptions returns the current global options configuration.
// This function retrieves the current configuration options for the logging package.
// The options include print mode, date format, asynchronous mode, etc.
// Return:
//
// Options - The current global options configuration.
func GetOptions() Options {
return *opts
}

// ResetOptionsToDefault resets the global options to their default values.
// This function initializes the opts variable with a new instance of the Options struct, effectively resetting all
// options to their default values.
Expand Down

0 comments on commit df5db83

Please sign in to comment.