refactor: use go workspace for syncthing gui (#549)

This commit is contained in:
naison
2025-04-19 12:09:06 +08:00
committed by GitHub
parent c9f1ce6522
commit 48e30b4344
15 changed files with 2072 additions and 142 deletions

View File

@@ -1 +0,0 @@
gui.files.go

View File

@@ -1,10 +0,0 @@
// Copyright (C) 2014 The Syncthing Authors.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.
//go:generate go run ../../../script/genassets.go -o gui.files.go ../../../gui
// Package auto contains auto generated files for web assets.
package auto

View File

@@ -1,33 +0,0 @@
// Copyright (C) 2021 The Syncthing Authors.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.
//go:build noassets
// +build noassets
package auto
import (
"bytes"
"compress/gzip"
"github.com/syncthing/syncthing/lib/assets"
)
func Assets() map[string]assets.Asset {
// Return a minimal index.html and nothing else, to allow the trivial
// test to pass.
buf := new(bytes.Buffer)
gw := gzip.NewWriter(buf)
_, _ = gw.Write([]byte("<html></html>"))
_ = gw.Flush()
return map[string]assets.Asset{
"default/index.html": {
Gzipped: true,
Content: buf.String(),
},
}
}

2
vendor/modules.txt vendored
View File

@@ -1,3 +1,4 @@
## workspace
# cel.dev/expr v0.19.1
## explicit; go 1.21.1
cel.dev/expr
@@ -1492,7 +1493,6 @@ github.com/syncthing/syncthing/internal/gen/dbproto
github.com/syncthing/syncthing/internal/gen/discoproto
github.com/syncthing/syncthing/internal/protoutil
github.com/syncthing/syncthing/lib/api
github.com/syncthing/syncthing/lib/api/auto
github.com/syncthing/syncthing/lib/assets
github.com/syncthing/syncthing/lib/beacon
github.com/syncthing/syncthing/lib/build