Skip to content

Commit

Permalink
Refactor: improve package name
Browse files Browse the repository at this point in the history
  • Loading branch information
nexryai committed Jun 11, 2024
1 parent 2cf9dbb commit a799b1b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package entities
package model

// core.Configではなく今後はentitiesを使うようにする

Expand Down
4 changes: 2 additions & 2 deletions internal/render/nftables.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package render
import (
"fmt"
"lance-light/internal/config"
"lance-light/internal/entities"
"lance-light/internal/iputil"
"lance-light/internal/log"
"lance-light/internal/model"
"strings"
)

Expand Down Expand Up @@ -219,7 +219,7 @@ func MkNat(c *config.NatConfig) string {
return rule
}

func MkSnatForDnat(c *entities.SnatForDnat) string {
func MkSnatForDnat(c *model.SnatForDnat) string {
return fmt.Sprintf("\t\toifname %s ip saddr %s counter snat to %s",
c.ExternalInterface, c.InternalIP, c.ExternalIP)
}
Expand Down
4 changes: 2 additions & 2 deletions internal/render/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"github.com/lorenzosaino/go-sysctl"
"lance-light/internal/config"
"lance-light/internal/entities"
"lance-light/internal/iputil"
"lance-light/internal/log"
"lance-light/internal/model"
)

/*
Expand Down Expand Up @@ -289,7 +289,7 @@ func GenRulesFromConfig(cfg *config.Config) []string {
panic("invalid ip in cfg")
}

snat := entities.SnatForDnat{
snat := model.SnatForDnat{
ExternalInterface: c.Interface,
InternalIP: internalIP,
ExternalIP: c.DstIP,
Expand Down

0 comments on commit a799b1b

Please sign in to comment.