Remove resetDNSMsg

This commit is contained in:
Jeffrey Serio 2023-04-23 21:42:15 +00:00 committed by Jeffrey Serio
parent b47b78559d
commit 985e3d080b
3 changed files with 3 additions and 13 deletions

View File

@ -9,13 +9,13 @@ This is a Go implementation of the Python-written [concentration](https://github
## Installation
```bash
go install git.envs.net/hyperreal/go-hyperfocus@latest
go install codeberg.org/hyperreal/hyperfocus@latest
```
## Usage
```bash
sudo go-hyperfocus --help
sudo hyperfocus --help
```
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/N4N2CT2JG)

2
go.mod
View File

@ -1,4 +1,4 @@
module git.envs.net/hyperreal/go-hyperfocus
module codeberg.org/hyperreal/hyperfocus
go 1.17

10
main.go
View File

@ -91,13 +91,6 @@ func isRoot() bool {
// Disables access to websites that are defined as 'distractors'
func improveFocus() {
var displayMsg bool = false
// If first run, display resetDNSMsg
if !fileExists(localFilePaths["hostsBackup"]) {
displayMsg = true
}
// Backup host file if a backup does not already exist
if !fileExists(localFilePaths["hostsBackup"]) {
if err := copyFile(localFilePaths["hosts"], localFilePaths["hostsBackup"]); err != nil {
@ -180,9 +173,6 @@ func improveFocus() {
}
fmt.Println("Focus is now improved 😊")
if displayMsg {
fmt.Println(resetDNSMsg)
}
}
// Enables access to websites that are defined as 'distractors'