Skip to content

Commit

Permalink
Refactoring code and moving to pkg directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
gokhan-uysal committed Jul 11, 2024
1 parent d9a4d71 commit 3e36c82
Show file tree
Hide file tree
Showing 12 changed files with 326 additions and 330 deletions.
5 changes: 2 additions & 3 deletions cmd/pingo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import (
"fmt"
"syscall"

"github.com/code-brew-lab/pingo/internal/netcore"
"github.com/code-brew-lab/pingo/internal/netcore/ipv4"
"github.com/code-brew-lab/pingo/pkg/netcore"
)

func main() {
Expand All @@ -24,7 +23,7 @@ func main() {
continue
}

datagram, err := netcore.ParseDatagram(buf[:numRead], ipv4.ProtoICMP)
datagram, err := netcore.ParseDatagram(buf[:numRead], netcore.ProtocolICMP)
if err != nil {
fmt.Println(err)
continue
Expand Down
17 changes: 0 additions & 17 deletions internal/netcore/icmp/header.go

This file was deleted.

16 changes: 0 additions & 16 deletions internal/netcore/icmp/icmp.go

This file was deleted.

180 changes: 0 additions & 180 deletions internal/netcore/ipv4/header.go

This file was deleted.

39 changes: 0 additions & 39 deletions internal/netcore/ipv4/ip.go

This file was deleted.

60 changes: 0 additions & 60 deletions internal/netcore/ipv4/protocol.go

This file was deleted.

File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 3e36c82

Please sign in to comment.