feat(sunsonic): expose type serverVersion in subsonic responses
https://opensubsonic.netlify.app/docs/responses/subsonic-response/ https://github.com/opensubsonic/open-subsonic-api/discussions/3
This commit is contained in:
@@ -64,11 +64,11 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if *confShowVersion {
|
if *confShowVersion {
|
||||||
fmt.Println(gonic.Version)
|
fmt.Printf("v%s\n", gonic.Version)
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Printf("starting gonic %s\n", gonic.Version)
|
log.Printf("starting gonic v%s\n", gonic.Version)
|
||||||
log.Printf("provided config\n")
|
log.Printf("provided config\n")
|
||||||
set.VisitAll(func(f *flag.Flag) {
|
set.VisitAll(func(f *flag.Flag) {
|
||||||
value := strings.ReplaceAll(f.Value.String(), "\n", "")
|
value := strings.ReplaceAll(f.Value.String(), "\n", "")
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ slot }}
|
{{ slot }}
|
||||||
<div class="px-5 text-right whitespace-nowrap">
|
<div class="px-5 text-right whitespace-nowrap">
|
||||||
<span class="text-gray-500">{{ .Version }}</span>
|
<span class="text-gray-500">v{{ .Version }}</span>
|
||||||
senan kelly, 2020
|
senan kelly, 2020
|
||||||
<span class="text-gray-500">|</span>
|
<span class="text-gray-500">|</span>
|
||||||
{{ component "ext_link" (props . "To" "https://github.com/sentriz/gonic") }}github{{ end }}
|
{{ component "ext_link" (props . "To" "https://github.com/sentriz/gonic") }}github{{ end }}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import (
|
|||||||
|
|
||||||
jd "github.com/josephburnett/jd/lib"
|
jd "github.com/josephburnett/jd/lib"
|
||||||
|
|
||||||
|
"go.senan.xyz/gonic"
|
||||||
"go.senan.xyz/gonic/db"
|
"go.senan.xyz/gonic/db"
|
||||||
"go.senan.xyz/gonic/mockfs"
|
"go.senan.xyz/gonic/mockfs"
|
||||||
"go.senan.xyz/gonic/paths"
|
"go.senan.xyz/gonic/paths"
|
||||||
@@ -174,6 +175,7 @@ func makec(t *testing.T, roots []string, audio bool) *Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestMain(m *testing.M) {
|
func TestMain(m *testing.M) {
|
||||||
|
gonic.Version = ""
|
||||||
log.SetOutput(io.Discard)
|
log.SetOutput(io.Discard)
|
||||||
os.Exit(m.Run())
|
os.Exit(m.Run())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,11 @@ type Response struct {
|
|||||||
Status string `xml:"status,attr" json:"status"`
|
Status string `xml:"status,attr" json:"status"`
|
||||||
Version string `xml:"version,attr" json:"version"`
|
Version string `xml:"version,attr" json:"version"`
|
||||||
XMLNS string `xml:"xmlns,attr" json:"-"`
|
XMLNS string `xml:"xmlns,attr" json:"-"`
|
||||||
|
|
||||||
|
// https://opensubsonic.netlify.app/docs/responses/subsonic-response/
|
||||||
Type string `xml:"type,attr" json:"type"`
|
Type string `xml:"type,attr" json:"type"`
|
||||||
|
ServerVersion string `xml:"serverVersion,attr" json:"serverVersion"`
|
||||||
|
|
||||||
Error *Error `xml:"error" json:"error,omitempty"`
|
Error *Error `xml:"error" json:"error,omitempty"`
|
||||||
Albums *Albums `xml:"albumList" json:"albumList,omitempty"`
|
Albums *Albums `xml:"albumList" json:"albumList,omitempty"`
|
||||||
AlbumsTwo *Albums `xml:"albumList2" json:"albumList2,omitempty"`
|
AlbumsTwo *Albums `xml:"albumList2" json:"albumList2,omitempty"`
|
||||||
@@ -68,6 +72,7 @@ func NewResponse() *Response {
|
|||||||
XMLNS: xmlns,
|
XMLNS: xmlns,
|
||||||
Version: apiVersion,
|
Version: apiVersion,
|
||||||
Type: gonic.Name,
|
Type: gonic.Name,
|
||||||
|
ServerVersion: gonic.Version,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,6 +103,7 @@ func NewError(code int, message string, a ...interface{}) *Response {
|
|||||||
Message: fmt.Sprintf(message, a...),
|
Message: fmt.Sprintf(message, a...),
|
||||||
},
|
},
|
||||||
Type: gonic.Name,
|
Type: gonic.Name,
|
||||||
|
ServerVersion: gonic.Version,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"albumList": {
|
"albumList": {
|
||||||
"album": [
|
"album": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"albumList": {
|
"albumList": {
|
||||||
"album": [
|
"album": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"albumList": {
|
"albumList": {
|
||||||
"album": [
|
"album": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,8 +3,22 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"albumList": {
|
"albumList": {
|
||||||
"album": [
|
"album": [
|
||||||
|
{
|
||||||
|
"id": "al-13",
|
||||||
|
"coverArt": "al-13",
|
||||||
|
"artist": "artist-2",
|
||||||
|
"created": "2019-11-30T00:00:00Z",
|
||||||
|
"title": "album-2",
|
||||||
|
"album": "",
|
||||||
|
"parent": "al-10",
|
||||||
|
"isDir": true,
|
||||||
|
"name": "",
|
||||||
|
"songCount": 3,
|
||||||
|
"duration": 300
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "al-12",
|
"id": "al-12",
|
||||||
"coverArt": "al-12",
|
"coverArt": "al-12",
|
||||||
@@ -32,26 +46,13 @@
|
|||||||
"duration": 300
|
"duration": 300
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "al-4",
|
"id": "al-5",
|
||||||
"coverArt": "al-4",
|
"coverArt": "al-5",
|
||||||
"artist": "artist-0",
|
"artist": "artist-0",
|
||||||
"created": "2019-11-30T00:00:00Z",
|
"created": "2019-11-30T00:00:00Z",
|
||||||
"title": "album-1",
|
|
||||||
"album": "",
|
|
||||||
"parent": "al-2",
|
|
||||||
"isDir": true,
|
|
||||||
"name": "",
|
|
||||||
"songCount": 3,
|
|
||||||
"duration": 300
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "al-13",
|
|
||||||
"coverArt": "al-13",
|
|
||||||
"artist": "artist-2",
|
|
||||||
"created": "2019-11-30T00:00:00Z",
|
|
||||||
"title": "album-2",
|
"title": "album-2",
|
||||||
"album": "",
|
"album": "",
|
||||||
"parent": "al-10",
|
"parent": "al-2",
|
||||||
"isDir": true,
|
"isDir": true,
|
||||||
"name": "",
|
"name": "",
|
||||||
"songCount": 3,
|
"songCount": 3,
|
||||||
@@ -110,11 +111,11 @@
|
|||||||
"duration": 300
|
"duration": 300
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "al-5",
|
"id": "al-4",
|
||||||
"coverArt": "al-5",
|
"coverArt": "al-4",
|
||||||
"artist": "artist-0",
|
"artist": "artist-0",
|
||||||
"created": "2019-11-30T00:00:00Z",
|
"created": "2019-11-30T00:00:00Z",
|
||||||
"title": "album-2",
|
"title": "album-1",
|
||||||
"album": "",
|
"album": "",
|
||||||
"parent": "al-2",
|
"parent": "al-2",
|
||||||
"isDir": true,
|
"isDir": true,
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"albumList2": {
|
"albumList2": {
|
||||||
"album": [
|
"album": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"albumList2": {
|
"albumList2": {
|
||||||
"album": [
|
"album": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"albumList2": {
|
"albumList2": {
|
||||||
"album": [
|
"album": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,60 +3,9 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"albumList2": {
|
"albumList2": {
|
||||||
"album": [
|
"album": [
|
||||||
{
|
|
||||||
"id": "al-3",
|
|
||||||
"coverArt": "al-3",
|
|
||||||
"artistId": "ar-1",
|
|
||||||
"artist": "artist-0",
|
|
||||||
"created": "2019-11-30T00:00:00Z",
|
|
||||||
"title": "",
|
|
||||||
"album": "",
|
|
||||||
"name": "album-0",
|
|
||||||
"songCount": 3,
|
|
||||||
"duration": 300,
|
|
||||||
"year": 2021
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "al-5",
|
|
||||||
"coverArt": "al-5",
|
|
||||||
"artistId": "ar-1",
|
|
||||||
"artist": "artist-0",
|
|
||||||
"created": "2019-11-30T00:00:00Z",
|
|
||||||
"title": "",
|
|
||||||
"album": "",
|
|
||||||
"name": "album-2",
|
|
||||||
"songCount": 3,
|
|
||||||
"duration": 300,
|
|
||||||
"year": 2021
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "al-11",
|
|
||||||
"coverArt": "al-11",
|
|
||||||
"artistId": "ar-3",
|
|
||||||
"artist": "artist-2",
|
|
||||||
"created": "2019-11-30T00:00:00Z",
|
|
||||||
"title": "",
|
|
||||||
"album": "",
|
|
||||||
"name": "album-0",
|
|
||||||
"songCount": 3,
|
|
||||||
"duration": 300,
|
|
||||||
"year": 2021
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "al-9",
|
|
||||||
"coverArt": "al-9",
|
|
||||||
"artistId": "ar-2",
|
|
||||||
"artist": "artist-1",
|
|
||||||
"created": "2019-11-30T00:00:00Z",
|
|
||||||
"title": "",
|
|
||||||
"album": "",
|
|
||||||
"name": "album-2",
|
|
||||||
"songCount": 3,
|
|
||||||
"duration": 300,
|
|
||||||
"year": 2021
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": "al-13",
|
"id": "al-13",
|
||||||
"coverArt": "al-13",
|
"coverArt": "al-13",
|
||||||
@@ -84,14 +33,27 @@
|
|||||||
"year": 2021
|
"year": 2021
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "al-8",
|
"id": "al-11",
|
||||||
"coverArt": "al-8",
|
"coverArt": "al-11",
|
||||||
"artistId": "ar-2",
|
"artistId": "ar-3",
|
||||||
"artist": "artist-1",
|
"artist": "artist-2",
|
||||||
"created": "2019-11-30T00:00:00Z",
|
"created": "2019-11-30T00:00:00Z",
|
||||||
"title": "",
|
"title": "",
|
||||||
"album": "",
|
"album": "",
|
||||||
"name": "album-1",
|
"name": "album-0",
|
||||||
|
"songCount": 3,
|
||||||
|
"duration": 300,
|
||||||
|
"year": 2021
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "al-3",
|
||||||
|
"coverArt": "al-3",
|
||||||
|
"artistId": "ar-1",
|
||||||
|
"artist": "artist-0",
|
||||||
|
"created": "2019-11-30T00:00:00Z",
|
||||||
|
"title": "",
|
||||||
|
"album": "",
|
||||||
|
"name": "album-0",
|
||||||
"songCount": 3,
|
"songCount": 3,
|
||||||
"duration": 300,
|
"duration": 300,
|
||||||
"year": 2021
|
"year": 2021
|
||||||
@@ -109,6 +71,45 @@
|
|||||||
"duration": 300,
|
"duration": 300,
|
||||||
"year": 2021
|
"year": 2021
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "al-5",
|
||||||
|
"coverArt": "al-5",
|
||||||
|
"artistId": "ar-1",
|
||||||
|
"artist": "artist-0",
|
||||||
|
"created": "2019-11-30T00:00:00Z",
|
||||||
|
"title": "",
|
||||||
|
"album": "",
|
||||||
|
"name": "album-2",
|
||||||
|
"songCount": 3,
|
||||||
|
"duration": 300,
|
||||||
|
"year": 2021
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "al-9",
|
||||||
|
"coverArt": "al-9",
|
||||||
|
"artistId": "ar-2",
|
||||||
|
"artist": "artist-1",
|
||||||
|
"created": "2019-11-30T00:00:00Z",
|
||||||
|
"title": "",
|
||||||
|
"album": "",
|
||||||
|
"name": "album-2",
|
||||||
|
"songCount": 3,
|
||||||
|
"duration": 300,
|
||||||
|
"year": 2021
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "al-8",
|
||||||
|
"coverArt": "al-8",
|
||||||
|
"artistId": "ar-2",
|
||||||
|
"artist": "artist-1",
|
||||||
|
"created": "2019-11-30T00:00:00Z",
|
||||||
|
"title": "",
|
||||||
|
"album": "",
|
||||||
|
"name": "album-1",
|
||||||
|
"songCount": 3,
|
||||||
|
"duration": 300,
|
||||||
|
"year": 2021
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "al-12",
|
"id": "al-12",
|
||||||
"coverArt": "al-12",
|
"coverArt": "al-12",
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"album": {
|
"album": {
|
||||||
"id": "al-3",
|
"id": "al-3",
|
||||||
"coverArt": "al-3",
|
"coverArt": "al-3",
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"album": {
|
"album": {
|
||||||
"id": "al-2",
|
"id": "al-2",
|
||||||
"created": "2019-11-30T00:00:00Z",
|
"created": "2019-11-30T00:00:00Z",
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"artist": {
|
"artist": {
|
||||||
"id": "ar-1",
|
"id": "ar-1",
|
||||||
"name": "artist-0",
|
"name": "artist-0",
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"artist": {
|
"artist": {
|
||||||
"id": "ar-3",
|
"id": "ar-3",
|
||||||
"name": "artist-2",
|
"name": "artist-2",
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"artist": {
|
"artist": {
|
||||||
"id": "ar-2",
|
"id": "ar-2",
|
||||||
"name": "artist-1",
|
"name": "artist-1",
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"artists": {
|
"artists": {
|
||||||
"ignoredArticles": "",
|
"ignoredArticles": "",
|
||||||
"index": [
|
"index": [
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"artists": {
|
"artists": {
|
||||||
"ignoredArticles": "",
|
"ignoredArticles": "",
|
||||||
"index": [
|
"index": [
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"artists": {
|
"artists": {
|
||||||
"ignoredArticles": "",
|
"ignoredArticles": "",
|
||||||
"index": [
|
"index": [
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"lastModified": 0,
|
"lastModified": 0,
|
||||||
"ignoredArticles": "",
|
"ignoredArticles": "",
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"lastModified": 0,
|
"lastModified": 0,
|
||||||
"ignoredArticles": "",
|
"ignoredArticles": "",
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"indexes": {
|
"indexes": {
|
||||||
"lastModified": 0,
|
"lastModified": 0,
|
||||||
"ignoredArticles": "",
|
"ignoredArticles": "",
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"directory": {
|
"directory": {
|
||||||
"id": "al-3",
|
"id": "al-3",
|
||||||
"parent": "al-2",
|
"parent": "al-2",
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"directory": {
|
"directory": {
|
||||||
"id": "al-2",
|
"id": "al-2",
|
||||||
"parent": "al-1",
|
"parent": "al-1",
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"searchResult3": {
|
"searchResult3": {
|
||||||
"album": [
|
"album": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"searchResult3": {
|
"searchResult3": {
|
||||||
"artist": [
|
"artist": [
|
||||||
{ "id": "ar-1", "name": "artist-0", "albumCount": 3 },
|
{ "id": "ar-1", "name": "artist-0", "albumCount": 3 },
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"searchResult3": {
|
"searchResult3": {
|
||||||
"song": [
|
"song": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"searchResult2": {
|
"searchResult2": {
|
||||||
"album": [
|
"album": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"searchResult2": {
|
"searchResult2": {
|
||||||
"artist": [
|
"artist": [
|
||||||
{ "id": "al-2", "parent": "al-1", "name": "artist-0" },
|
{ "id": "al-2", "parent": "al-1", "name": "artist-0" },
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": "1.15.0",
|
"version": "1.15.0",
|
||||||
"type": "gonic",
|
"type": "gonic",
|
||||||
|
"serverVersion": "",
|
||||||
"searchResult2": {
|
"searchResult2": {
|
||||||
"song": [
|
"song": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,13 +3,12 @@ package gonic
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
_ "embed"
|
_ "embed"
|
||||||
"fmt"
|
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed version.txt
|
//go:embed version.txt
|
||||||
var version string
|
var version string
|
||||||
var Version = fmt.Sprintf("v%s", strings.TrimSpace(version))
|
var Version = strings.TrimSpace(version)
|
||||||
|
|
||||||
const Name = "gonic"
|
const Name = "gonic"
|
||||||
const NameUpper = "GONIC"
|
const NameUpper = "GONIC"
|
||||||
|
|||||||
Reference in New Issue
Block a user