Skip to content

Commit

Permalink
refactor: optimise structs to reduce memory usage and add gmail host (#6
Browse files Browse the repository at this point in the history
)

* refactor: optmize structs to reduce memory usage and add gmail host

* refactor: removes gmails host
  • Loading branch information
rflpazini authored Jul 30, 2024
1 parent 0ba1752 commit 9245767
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.idea

ultrafocus
demo.cast
.DS_Store
2 changes: 1 addition & 1 deletion cli/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
)

type command struct {
Run func(m model) model
Name string
Desc string
Run func(m model) model
}

var commandFocusOn = command{
Expand Down
6 changes: 3 additions & 3 deletions cli/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ const (
)

type model struct {
commandsListSelection int
textarea textarea.Model
fatalErr error
status hosts.FocusStatus
domains []string
commandsListSelection int
state sessionState
status hosts.FocusStatus
textarea textarea.Model
}

func NewModel() model {
Expand Down
4 changes: 2 additions & 2 deletions hosts/hosts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ func TestExtractDomainsFromData(t *testing.T) {
tests := []struct {
name string
data string
wantDomains []string
wantStatus FocusStatus
wantDomains []string
wantErr bool
}{
{
Expand Down Expand Up @@ -77,9 +77,9 @@ func TestUpdateHostsData(t *testing.T) {
tests := []struct {
name string
originalData string
domains []string
status FocusStatus
wantNewData string
domains []string
wantErr bool
}{
{
Expand Down

0 comments on commit 9245767

Please sign in to comment.