Skip to content

Commit

Permalink
fix: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dosco committed Sep 5, 2024
1 parent 3fb8338 commit 5b24f36
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 1,470 deletions.
53 changes: 23 additions & 30 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,34 @@
{
"name": "Graphjin Dev",
"dockerComposeFile": "docker-compose.dev.yml",
"service": "app",
"name": "Graphjin Dev",
"dockerComposeFile": "docker-compose.dev.yml",
"service": "app",
"shutdownAction": "stopCompose",
"workspaceFolder": "/workspace",
"workspaceFolder": "/workspace",
"settings": {
"#terminal.integrated.defaultProfile.linux#": "/bin/bash",
"[go]": {
"editor.formatOnSave": true
},
"go.useLanguageServer": true,
"go.testFlags": [
"-short",
"-v"
],
"go.testTimeout": "30m"

"[go]": {
"editor.formatOnSave": true
},
"go.useLanguageServer": true,
"go.testFlags": ["-short", "-v"],
"go.testTimeout": "30m"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"golang.go",
"mhutchie.git-graph"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [8080],
// Add the IDs of extensions you want installed when the container is created.
"extensions": ["golang.go", "mhutchie.git-graph"],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [8080]

// Uncomment the next line if you want start specific services in your Docker Compose config.
// "runServices": [],
// Uncomment the next line if you want start specific services in your Docker Compose config.
// "runServices": [],

// Uncomment the next line if you want to keep your containers running after VS Code shuts down.
// "shutdownAction": "none",
// Uncomment the next line if you want to keep your containers running after VS Code shuts down.
// "shutdownAction": "none",

// Uncomment the next line to run commands after the container is created - for example installing curl.
// "postCreateCommand": "apt-get update && apt-get install -y curl",
// Uncomment the next line to run commands after the container is created - for example installing curl.
// "postCreateCommand": "apt-get update && apt-get install -y curl",

// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"
// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"
}
6 changes: 3 additions & 3 deletions .devcontainer/docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
version: "3.8"
services:
db:
image: postgres:12
image: postgres:16
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"

app:
build:
context: ..
Expand All @@ -30,4 +30,4 @@ services:
volumes:
my-app:
vscode-extensions:
vscode-extensions-insiders:
vscode-extensions-insiders:
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ ifndef GOPATH
override GOPATH = $(HOME)/go
endif

export GO111MODULE := on
# export GO111MODULE := on

# Build-time Go variables
BUILD_FLAGS ?= -ldflags '-s -w -X "main.version=${BUILD_VERSION}" -X "main.commit=${BUILD}" -X "main.date=${BUILD_DATE}" -X "github.com/dosco/graphjin/serv/v3.version=${BUILD_VERSION}"'

.PHONY: all download-tools build wasm-build gen clean tidy test test-norace run run-github-actions lint changlog release version help $(PLATFORMS)

tidy:
@go mod tidy -go=1.16 && go mod tidy -go=1.17
@find . -name "go.mod" -execdir go mod tidy \;

test:
@go test -v -race $(PACKAGES)
Expand Down Expand Up @@ -70,17 +70,17 @@ gen: download-tools
@go generate ./...

$(BINARY):
@CGO_ENABLED=0 go build $(BUILD_FLAGS) -o $(BINARY) cmd/*.go
@CGO_ENABLED=0 GOTOOLCHAIN=auto go build $(BUILD_FLAGS) -o $(BINARY) cmd/*.go
$(WASM):
@cp $(GOROOT)/misc/wasm/wasm_exec.js ./wasm/js/
@GOOS=js GOARCH=wasm go build -o ./wasm/graphjin.wasm ./wasm/*.go
@GOOS=js GOARCH=wasm GOTOOLCHAIN=auto go build -o ./wasm/graphjin.wasm ./wasm/*.go

clean:
@rm -f $(BINARY)
@rm -f $(WASM)

run: clean
@go run $(BUILD_FLAGS) cmd/*.go $(ARGS)
@GOTOOLCHAIN=auto go run $(BUILD_FLAGS) cmd/*.go $(ARGS)

run-github-actions:
@act push --job linter
Expand Down
2 changes: 1 addition & 1 deletion auth/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.18
require (
github.com/adjust/gorails v0.0.0-20171013043634-2786ed0c03d3
github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874
github.com/dosco/graphjin/core/v3 v3.0.0-20240503072632-ee9ecd63cbc1
github.com/dosco/graphjin/core/v3 v3.0.31
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/gomodule/redigo v1.9.2
github.com/gorilla/websocket v1.5.1
Expand Down
10 changes: 3 additions & 7 deletions cmd/go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
module github.com/dosco/graphjin/cmd/v3

go 1.21

toolchain go1.21.0
go 1.18

require (
github.com/brianvoe/gofakeit/v6 v6.28.0
github.com/dop251/goja v0.0.0-20240220182346-e401ed450204
github.com/dosco/graphjin/core/v3 v3.0.0-20240503072632-ee9ecd63cbc1
github.com/dosco/graphjin/serv/v3 v3.0.0-20240503072632-ee9ecd63cbc1
github.com/dosco/graphjin/core/v3 v3.0.31
github.com/dosco/graphjin/serv/v3 v3.0.31
github.com/gosimple/slug v1.14.0
github.com/jackc/pgx/v5 v5.5.5
github.com/jvatic/goja-babel v0.0.0-20240430111315-efc2226a021f
Expand Down Expand Up @@ -48,8 +46,6 @@ require (
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
github.com/dimchansky/utfbom v1.1.1 // indirect
github.com/dlclark/regexp2 v1.11.0 // indirect
github.com/dosco/graphjin/auth/v3 v3.0.0-20240503072632-ee9ecd63cbc1 // indirect
github.com/dosco/graphjin/plugin/otel/v3 v3.0.0-20240503072632-ee9ecd63cbc1 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
Expand Down
2 changes: 1 addition & 1 deletion conf/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/dosco/graphjin/conf/v3
go 1.18

require (
github.com/dosco/graphjin/core/v3 v3.0.0-20230131095039-2864a2e4a4db
github.com/dosco/graphjin/core/v3 v3.0.31
gopkg.in/yaml.v3 v3.0.1
)

Expand Down
6 changes: 0 additions & 6 deletions core/go.sum
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
14 changes: 8 additions & 6 deletions go.work
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
go 1.21
go 1.18

toolchain go1.23.1

use (
./core
./conf
./tests
./serv
./auth
./cmd
./wasm
./conf
./core
./plugin/otel
./serv
./tests
./wasm
)
Loading

0 comments on commit 5b24f36

Please sign in to comment.