Skip to content

Commit

Permalink
chore: refactoring code structure for better organization
Browse files Browse the repository at this point in the history
  • Loading branch information
isakruas committed Oct 27, 2024
1 parent 4df9331 commit 11762f6
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ GO_FILES := $(shell find . -name '*.go' | grep -v /vendor/ | grep -v _test.go)
GOARCH := $(shell go env GOARCH)
GOOS := $(shell go env GOOS)
BUILDDATE := $(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
CODEVERSION := "1.1.3"
CODEVERSION := "1.1.4"
CODEBUILDREVISION := $(shell git rev-parse HEAD)
.PHONY: all dep build clean test coverage zip lint

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
**ecutils**

## Version of the *Software*
**1.1.3**
**1.1.4**

## *Software* Description

Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PKG="$PROJECT_NAME"
PKG_LIST=$(go list "${PKG}/..." | grep -v /vendor/)
GO_FILES=$(find . -name '*.go' | grep -v /vendor/ | grep -v _test.go)
BUILDDATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
CODEVERSION="1.1.3"
CODEVERSION="1.1.4"
CODEBUILDREVISION=$(git rev-parse HEAD)
TARGETS=(
"linux/386"
Expand Down
10 changes: 5 additions & 5 deletions cmd/main.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package main

import (
pkg_ec "github.com/isakruas/go-ecutils/internal/ec"
pkg_ecdh "github.com/isakruas/go-ecutils/internal/ecdh"
pkg_ecdsa "github.com/isakruas/go-ecutils/internal/ecdsa"
pkg_eck "github.com/isakruas/go-ecutils/internal/eck"
pkg_ecmo "github.com/isakruas/go-ecutils/internal/ecmo"
pkg_ec "github.com/isakruas/go-ecutils/pkg/ec"
pkg_ecdh "github.com/isakruas/go-ecutils/pkg/ecdh"
pkg_ecdsa "github.com/isakruas/go-ecutils/pkg/ecdsa"
pkg_eck "github.com/isakruas/go-ecutils/pkg/eck"
pkg_ecmo "github.com/isakruas/go-ecutils/pkg/ecmo"

"flag"
"fmt"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/ec/ec_test.go → pkg/ec/ec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"math/big"
"testing"

"github.com/isakruas/go-ecutils/internal/ec"
"github.com/isakruas/go-ecutils/pkg/ec"
)

func TestECTrapdoorPanic(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/ecdh/ecdh.go → pkg/ecdh/ecdh.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package ecdh
import (
"math/big"

"github.com/isakruas/go-ecutils/internal/ec"
"github.com/isakruas/go-ecutils/pkg/ec"
)

// ECDH represents an Elliptic Curve Diffie Hellman entity with a curve and a private key
Expand Down
4 changes: 2 additions & 2 deletions internal/ecdh/ecdh_test.go → pkg/ecdh/ecdh_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"math/big"
"testing"

"github.com/isakruas/go-ecutils/internal/ec"
"github.com/isakruas/go-ecutils/internal/ecdh"
"github.com/isakruas/go-ecutils/pkg/ec"
"github.com/isakruas/go-ecutils/pkg/ecdh"
)

func TestECDHPublicKey(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/ecdsa/ecdsa.go → pkg/ecdsa/ecdsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"math/rand"
"time"

"github.com/isakruas/go-ecutils/internal/ec"
"github.com/isakruas/go-ecutils/pkg/ec"
)

// ECDSA structure
Expand Down
4 changes: 2 additions & 2 deletions internal/ecdsa/ecdsa_test.go → pkg/ecdsa/ecdsa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"math/big"
"testing"

"github.com/isakruas/go-ecutils/internal/ec"
"github.com/isakruas/go-ecutils/internal/ecdsa"
"github.com/isakruas/go-ecutils/pkg/ec"
"github.com/isakruas/go-ecutils/pkg/ecdsa"
)

func TestECDSAPublicKey(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/eck/eck.go → pkg/eck/eck.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"fmt"
"math/big"

"github.com/isakruas/go-ecutils/internal/ec"
"github.com/isakruas/go-ecutils/pkg/ec"
)

// ECK structure holding an elliptic curve
Expand Down
4 changes: 2 additions & 2 deletions internal/eck/eck_test.go → pkg/eck/eck_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"math/big"
"testing"

"github.com/isakruas/go-ecutils/internal/ec"
"github.com/isakruas/go-ecutils/internal/eck"
"github.com/isakruas/go-ecutils/pkg/ec"
"github.com/isakruas/go-ecutils/pkg/eck"
)

func TestECKEncodeDefault(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions internal/ecmo/ecmo.go → pkg/ecmo/ecmo.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ package ecmo
import (
"math/big"

"github.com/isakruas/go-ecutils/internal/ec"
"github.com/isakruas/go-ecutils/internal/ecdsa"
"github.com/isakruas/go-ecutils/internal/eck"
"github.com/isakruas/go-ecutils/pkg/ec"
"github.com/isakruas/go-ecutils/pkg/ecdsa"
"github.com/isakruas/go-ecutils/pkg/eck"
)

// ECMO represents the Massey–Omura elliptic curve protocol.
Expand Down
4 changes: 2 additions & 2 deletions internal/ecmo/ecmo_test.go → pkg/ecmo/ecmo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"math/big"
"testing"

"github.com/isakruas/go-ecutils/internal/ec"
"github.com/isakruas/go-ecutils/internal/ecmo"
"github.com/isakruas/go-ecutils/pkg/ec"
"github.com/isakruas/go-ecutils/pkg/ecmo"
)

func TestECMOPublicKey(t *testing.T) {
Expand Down

0 comments on commit 11762f6

Please sign in to comment.