Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
fixes global dir structures
Browse files Browse the repository at this point in the history
  • Loading branch information
zakhaev26 committed Feb 21, 2024
1 parent 6ae3828 commit b568e2c
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 6 deletions.
7 changes: 4 additions & 3 deletions mail/go.mod → go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
module github.com/p-society/mail
module github.com/p-society/gc-server

go 1.21.6
go 1.21.7

require github.com/gorilla/mux v1.8.1

require (
github.com/gorilla/mux v1.8.1 // indirect
github.com/joho/godotenv v1.5.1 // indirect
github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible // indirect
)
File renamed without changes.
Binary file modified mail/bin/main
Binary file not shown.
6 changes: 3 additions & 3 deletions mail/cmd/main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"github.com/gorilla/mux"
"github.com/joho/godotenv"
mailConfig "github.com/p-society/mail/internal"
models "github.com/p-society/mail/internal/models"
mailConfig "github.com/p-society/gc-server/mail/internal"
models "github.com/p-society/gc-server/mail/internal/models"
)

func main() {
Expand All @@ -25,7 +25,7 @@ func main() {
}

r.HandleFunc("/v0/mails", MailRequestHandler).Methods("POST")
fmt.Println("Server live at http://127.0.0.1"+ADDR)
fmt.Println("Server live at http://127.0.0.1" + ADDR)
http.ListenAndServe(ADDR, r)
}

Expand Down
26 changes: 26 additions & 0 deletions scripts/create_directory.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

# Set directory and repository name
directory="$1"
repo_name="$2"

# Validate arguments
if [[ -z "$directory" || -z "$repo_name" ]]; then
echo "Error: Please provide both directory and repository name."
exit 1
fi

# Initialize Go module
go mod init "$repo_name"

# Change directory
cd "$directory"

# Create directories
echo "Creating directories..."
mkdir -p bin cmd/main pkg internal

# Create touch files
touch cmd/main/main.go Makefile

echo "Project setup complete!"

0 comments on commit b568e2c

Please sign in to comment.