format: update import statements order for consistency
This commit is contained in:
parent
1b01041a14
commit
7b0c0df477
7 changed files with 16 additions and 15 deletions
|
@ -3,13 +3,14 @@ package server
|
|||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"github.com/charmbracelet/log"
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"git.smsvc.net/pomodoro/GoTomato/internal/metadata"
|
||||
"git.smsvc.net/pomodoro/GoTomato/internal/shared"
|
||||
"git.smsvc.net/pomodoro/GoTomato/internal/websocket"
|
||||
"git.smsvc.net/pomodoro/GoTomato/pkg/models"
|
||||
"github.com/charmbracelet/log"
|
||||
"net/http"
|
||||
"os"
|
||||
)
|
||||
|
||||
func Start() {
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package pomodoro
|
||||
|
||||
import (
|
||||
"git.smsvc.net/pomodoro/GoTomato/internal/shared"
|
||||
"git.smsvc.net/pomodoro/GoTomato/pkg/models"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"git.smsvc.net/pomodoro/GoTomato/internal/shared"
|
||||
"git.smsvc.net/pomodoro/GoTomato/pkg/models"
|
||||
)
|
||||
|
||||
var mu sync.Mutex // to synchronize access to shared state
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package pomodoro
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
import "time"
|
||||
|
||||
type Timer struct {
|
||||
TimeLeft chan int // time left
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package shared
|
||||
|
||||
import (
|
||||
"git.smsvc.net/pomodoro/GoTomato/pkg/models"
|
||||
)
|
||||
import "git.smsvc.net/pomodoro/GoTomato/pkg/models"
|
||||
|
||||
var DefaultServerConfig = models.ServerConfig{
|
||||
ListenAddress: "0.0.0.0",
|
||||
|
|
|
@ -2,10 +2,11 @@ package websocket
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"git.smsvc.net/pomodoro/GoTomato/internal/shared"
|
||||
"github.com/charmbracelet/log"
|
||||
"github.com/gorilla/websocket"
|
||||
"time"
|
||||
|
||||
"git.smsvc.net/pomodoro/GoTomato/internal/shared"
|
||||
)
|
||||
|
||||
// sends continous messages to all connected WebSocket clients.
|
||||
|
|
|
@ -2,11 +2,12 @@ package websocket
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/charmbracelet/log"
|
||||
"github.com/gorilla/websocket"
|
||||
|
||||
"git.smsvc.net/pomodoro/GoTomato/internal/pomodoro"
|
||||
"git.smsvc.net/pomodoro/GoTomato/internal/shared"
|
||||
"git.smsvc.net/pomodoro/GoTomato/pkg/models"
|
||||
"github.com/charmbracelet/log"
|
||||
"github.com/gorilla/websocket"
|
||||
)
|
||||
|
||||
// handleClientCommands listens for commands from WebSocket clients
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
package websocket
|
||||
|
||||
import (
|
||||
"git.smsvc.net/pomodoro/GoTomato/pkg/models"
|
||||
"github.com/charmbracelet/log"
|
||||
"github.com/gorilla/websocket"
|
||||
"net/http"
|
||||
"sync"
|
||||
|
||||
"git.smsvc.net/pomodoro/GoTomato/pkg/models"
|
||||
)
|
||||
|
||||
// Clients is a map of connected WebSocket clients, where each client is represented by the Client struct
|
||||
|
|
Loading…
Reference in a new issue