mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
8ef9c1aff5 | |||
6ed3493aa0 | |||
5959d056f3 | |||
92ad202bfe | |||
cd4acb5eec | |||
a32be0b44a | |||
b2080649ea | |||
851c38b8fd |
@ -27,7 +27,7 @@ RUN set -eux; apt-get update; \
|
|||||||
#
|
#
|
||||||
# build server
|
# build server
|
||||||
COPY server/ .
|
COPY server/ .
|
||||||
RUN go get -v -t -d . && go build -o bin/neko cmd/neko/main.go
|
RUN ./build
|
||||||
|
|
||||||
#
|
#
|
||||||
# STAGE 2: CLIENT
|
# STAGE 2: CLIENT
|
||||||
|
@ -27,29 +27,32 @@ RUN set -eux; apt-get update; \
|
|||||||
#
|
#
|
||||||
# build server
|
# build server
|
||||||
COPY server/ .
|
COPY server/ .
|
||||||
RUN go get -v -t -d . && go build -o bin/neko cmd/neko/main.go
|
RUN ./build
|
||||||
|
|
||||||
#
|
#
|
||||||
# STAGE 2: CLIENT
|
# STAGE 2: CLIENT
|
||||||
#
|
#
|
||||||
FROM node:18-bullseye-slim as client
|
|
||||||
|
|
||||||
# install dependencies
|
|
||||||
RUN set -eux; apt-get update; \
|
|
||||||
apt-get install -y --no-install-recommends python2 build-essential
|
|
||||||
|
|
||||||
WORKDIR /src
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# install dependencies
|
# Because client builds fail in Github Actions, therefor we build it outside of Docker.
|
||||||
COPY client/package*.json ./
|
#
|
||||||
RUN npm install
|
# FROM node:18-bullseye-slim as client
|
||||||
|
#
|
||||||
|
# # install dependencies
|
||||||
|
# RUN set -eux; apt-get update; \
|
||||||
|
# apt-get install -y --no-install-recommends python2 build-essential
|
||||||
|
#
|
||||||
|
# WORKDIR /src
|
||||||
|
#
|
||||||
|
# #
|
||||||
|
# # install dependencies
|
||||||
|
# COPY client/package*.json ./
|
||||||
|
# RUN npm install
|
||||||
|
#
|
||||||
|
# #
|
||||||
|
# # build client
|
||||||
|
# COPY client/ .
|
||||||
|
# RUN npm run build
|
||||||
#
|
#
|
||||||
# build client
|
|
||||||
COPY client/ .
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# STAGE 3: RUNTIME
|
# STAGE 3: RUNTIME
|
||||||
#
|
#
|
||||||
@ -134,7 +137,8 @@ ENV NEKO_BIND=:8080
|
|||||||
#
|
#
|
||||||
# copy static files from previous stages
|
# copy static files from previous stages
|
||||||
COPY --from=server /src/bin/neko /usr/bin/neko
|
COPY --from=server /src/bin/neko /usr/bin/neko
|
||||||
COPY --from=client /src/dist/ /var/www
|
# COPY --from=client /src/dist/ /var/www
|
||||||
|
COPY client/dist/ /var/www
|
||||||
|
|
||||||
HEALTHCHECK --interval=10s --timeout=5s --retries=8 \
|
HEALTHCHECK --interval=10s --timeout=5s --retries=8 \
|
||||||
CMD wget -O - http://localhost:${NEKO_BIND#*:}/health || exit 1
|
CMD wget -O - http://localhost:${NEKO_BIND#*:}/health || exit 1
|
||||||
|
@ -27,7 +27,7 @@ RUN set -eux; apt-get update; \
|
|||||||
#
|
#
|
||||||
# build server
|
# build server
|
||||||
COPY server/ .
|
COPY server/ .
|
||||||
RUN go get -v -t -d . && go build -o bin/neko cmd/neko/main.go
|
RUN ./build
|
||||||
|
|
||||||
#
|
#
|
||||||
# STAGE 2: CLIENT
|
# STAGE 2: CLIENT
|
||||||
|
@ -82,7 +82,7 @@ RUN set -eux; apt-get update; \
|
|||||||
#
|
#
|
||||||
# build server
|
# build server
|
||||||
COPY server/ .
|
COPY server/ .
|
||||||
RUN go get -v -t -d . && go build -o bin/neko cmd/neko/main.go
|
RUN ./build
|
||||||
|
|
||||||
#
|
#
|
||||||
# STAGE 2: CLIENT
|
# STAGE 2: CLIENT
|
||||||
|
@ -3,7 +3,7 @@ FROM $BASE_IMAGE
|
|||||||
|
|
||||||
# latest working version with EGL: 111.0.5563.146, revert when resolved
|
# latest working version with EGL: 111.0.5563.146, revert when resolved
|
||||||
# 112.0.5615.49 fails: https://github.com/VirtualGL/virtualgl/issues/229
|
# 112.0.5615.49 fails: https://github.com/VirtualGL/virtualgl/issues/229
|
||||||
ARG SRC_URL="https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_112.0.5615.49-1_amd64.deb"
|
ARG SRC_URL="https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_111.0.5563.146-1_amd64.deb"
|
||||||
|
|
||||||
#
|
#
|
||||||
# install google chrome
|
# install google chrome
|
||||||
|
37
.github/workflows/ghcr-arm.yml
vendored
37
.github/workflows/ghcr-arm.yml
vendored
@ -13,7 +13,7 @@ env:
|
|||||||
PLATFORMS: linux/arm64,linux/arm/v7
|
PLATFORMS: linux/arm64,linux/arm/v7
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-base:
|
build-client:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
#
|
#
|
||||||
# do not run on forks
|
# do not run on forks
|
||||||
@ -23,6 +23,41 @@ jobs:
|
|||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
-
|
||||||
|
name: Set up node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18.x
|
||||||
|
-
|
||||||
|
name: Build client
|
||||||
|
run: |
|
||||||
|
cd client
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
-
|
||||||
|
name: Upload client dist
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: client-dist
|
||||||
|
path: client/dist
|
||||||
|
|
||||||
|
build-base:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
#
|
||||||
|
# do not run on forks
|
||||||
|
#
|
||||||
|
if: github.repository_owner == 'm1k1o'
|
||||||
|
needs: [ build-client ]
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
-
|
||||||
|
name: Download client dist
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: client-dist
|
||||||
|
path: client/dist
|
||||||
-
|
-
|
||||||
name: Set up QEMU
|
name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v1
|
||||||
|
4
LICENSE
4
LICENSE
@ -186,7 +186,9 @@
|
|||||||
same "printed page" as the copyright notice for easier
|
same "printed page" as the copyright notice for easier
|
||||||
identification within third-party archives.
|
identification within third-party archives.
|
||||||
|
|
||||||
Copyright 2020 Nurdism <nurdism.io@gmail.com>, 2020-2021 m1k1o
|
Copyright (C) 2020 Nurdism <nurdism.io@gmail.com>
|
||||||
|
Copyright (C) 2020-2023 m1k1o
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
@ -76,5 +76,12 @@
|
|||||||
about() {
|
about() {
|
||||||
this.$accessor.client.toggleAbout()
|
this.$accessor.client.toggleAbout()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
const default_lang = new URL(location.href).searchParams.get('lang')
|
||||||
|
if (default_lang && this.langs.includes(default_lang)) {
|
||||||
|
this.$i18n.locale = default_lang
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -6,5 +6,6 @@ Vue.use(VueI18n)
|
|||||||
|
|
||||||
export const i18n = new VueI18n({
|
export const i18n = new VueI18n({
|
||||||
locale: 'en',
|
locale: 'en',
|
||||||
|
fallbackLocale: 'en',
|
||||||
messages,
|
messages,
|
||||||
})
|
})
|
||||||
|
@ -4,6 +4,10 @@
|
|||||||
|
|
||||||
### New Features
|
### New Features
|
||||||
- Added nvidia support for firefox.
|
- Added nvidia support for firefox.
|
||||||
|
- Added `?lang=<lang>` parameter to the URL, which will set the language of the interface (by @mbattista).
|
||||||
|
|
||||||
|
### Misc
|
||||||
|
- Git commit and tag are now included in the build when creating a docker image.
|
||||||
|
|
||||||
## [n.eko v2.8.0](https://github.com/m1k1o/neko/releases/tag/v2.8.0)
|
## [n.eko v2.8.0](https://github.com/m1k1o/neko/releases/tag/v2.8.0)
|
||||||
|
|
||||||
|
@ -74,8 +74,9 @@ For images with VAAPI GPU hardware acceleration using intel drivers use:
|
|||||||
- `ghcr.io/m1k1o/neko/intel-xfce:latest`
|
- `ghcr.io/m1k1o/neko/intel-xfce:latest`
|
||||||
- `ghcr.io/m1k1o/neko/intel-kde:latest`
|
- `ghcr.io/m1k1o/neko/intel-kde:latest`
|
||||||
|
|
||||||
For images with Nvidia GPU hardware acceleration using EGL use:
|
For images with Nvidia GPU hardware acceleration using EGL (see example below) use (please note, there is a known issue with EGL and Chromium-based browsers, see [here](https://github.com/m1k1o/neko/issues/279)):
|
||||||
|
|
||||||
|
- `ghcr.io/m1k1o/neko/nvidia-firefox:latest`
|
||||||
- `ghcr.io/m1k1o/neko/nvidia-chromium:latest`
|
- `ghcr.io/m1k1o/neko/nvidia-chromium:latest`
|
||||||
- `ghcr.io/m1k1o/neko/nvidia-google-chrome:latest`
|
- `ghcr.io/m1k1o/neko/nvidia-google-chrome:latest`
|
||||||
- `ghcr.io/m1k1o/neko/nvidia-microsoft-edge:latest`
|
- `ghcr.io/m1k1o/neko/nvidia-microsoft-edge:latest`
|
||||||
@ -131,6 +132,17 @@ services:
|
|||||||
- UDP is generally better for latency. But some networks block UDP so it is good to have TCP available as fallback.
|
- UDP is generally better for latency. But some networks block UDP so it is good to have TCP available as fallback.
|
||||||
- Still, using `NEKO_ICELITE=true` is recommended.
|
- Still, using `NEKO_ICELITE=true` is recommended.
|
||||||
|
|
||||||
|
### Using turn servers instead of port forwarding
|
||||||
|
|
||||||
|
- If you don't want to use port forwarding, you can use turn servers.
|
||||||
|
- But you need to have your own turn server (e.g. [cotrun](https://github.com/coturn/coturn)) or have access to one.
|
||||||
|
- They are generally not free, because they require a lot of bandwidth.
|
||||||
|
- Please make sure that you correctly escape your turn server credentials in the environment variable or use aphostrophes.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
NEKO_ICESERVERS: '[{"urls": ["turn:<MY-COTURN-SERVER>:443?transport=udp", "turn:<MY-COTURN-SERVER>:443?transport=tcp", "turns:<MY-COTURN-SERVER>:443?transport=udp", "turns:<MY-COTURN-SERVER>:443?transport=tcp"], "credential": "<MY-COTURN-CREDENTIAL"}, {"urls": ["stun:stun.nextcloud.com:443"]}]'
|
||||||
|
```
|
||||||
|
|
||||||
### Want to customize and install own add-ons, set custom bookmarks?
|
### Want to customize and install own add-ons, set custom bookmarks?
|
||||||
- You would need to modify the existing policy file and mount it to your container.
|
- You would need to modify the existing policy file and mount it to your container.
|
||||||
- For Firefox, copy [this](https://github.com/m1k1o/neko/blob/master/.docker/firefox/policies.json) file, modify and mount it as: ` -v '${PWD}/policies.json:/usr/lib/firefox/distribution/policies.json'`
|
- For Firefox, copy [this](https://github.com/m1k1o/neko/blob/master/.docker/firefox/policies.json) file, modify and mount it as: ` -v '${PWD}/policies.json:/usr/lib/firefox/distribution/policies.json'`
|
||||||
@ -219,6 +231,12 @@ services:
|
|||||||
- You can verify that GPU is used for encoding by searching for `nvh264enc` in `docker logs neko` output.
|
- You can verify that GPU is used for encoding by searching for `nvh264enc` in `docker logs neko` output.
|
||||||
- If you don'ŧ specify `NEKO_HWENC: nvenc` environment variable, CPU encoding will be used but GPU will still be available for browser rendering.
|
- If you don'ŧ specify `NEKO_HWENC: nvenc` environment variable, CPU encoding will be used but GPU will still be available for browser rendering.
|
||||||
|
|
||||||
|
Broadcast pipeline is not hardware accelerated by default. You can use this pipeline created by [@evilalmus](https://github.com/m1k1o/neko/issues/276#issuecomment-1498362533).
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
NEKO_BROADCAST_PIPELINE: "flvmux name=mux ! rtmpsink location={url} pulsesrc device={device} ! audio/x-raw,channels=2 ! audioconvert ! voaacenc ! mux. ximagesrc display-name={display} show-pointer=false use-damage=false ! video/x-raw,framerate=30/1 ! videoconvert ! queue ! video/x-raw,format=NV12 ! nvh264enc name=encoder preset=low-latency-hq gop-size=25 spatial-aq=true temporal-aq=true bitrate=2800 vbv-buffer-size=2800 rc-mode=6 ! h264parse config-interval=-1 ! video/x-h264,stream-format=byte-stream,profile=high ! h264parse ! mux."
|
||||||
|
```
|
||||||
|
|
||||||
### Want to use VPN for your n.eko browsing?
|
### Want to use VPN for your n.eko browsing?
|
||||||
- Check this out: https://github.com/m1k1o/neko-vpn
|
- Check this out: https://github.com/m1k1o/neko-vpn
|
||||||
|
|
||||||
@ -238,6 +256,7 @@ services:
|
|||||||
- Adding `?cast=1` will hide all control and show only video.
|
- Adding `?cast=1` will hide all control and show only video.
|
||||||
- Adding `?embed=1` will hide most additional components and show only video.
|
- Adding `?embed=1` will hide most additional components and show only video.
|
||||||
- Adding `?volume=<0-1>` will set volume to given value.
|
- Adding `?volume=<0-1>` will set volume to given value.
|
||||||
|
- Adding `?lang=<language>` will set language to given value.
|
||||||
- e.g. `http(s)://<URL:Port>/?pwd=neko&usr=guest&cast=1`
|
- e.g. `http(s)://<URL:Port>/?pwd=neko&usr=guest&cast=1`
|
||||||
|
|
||||||
### Screen size
|
### Screen size
|
||||||
|
@ -210,3 +210,17 @@ Most likely you forgot to add `-cap-add=SYS_ADMIN` when using chromium-based bro
|
|||||||
```
|
```
|
||||||
|
|
||||||
This error originates from browser, that it could not connect to dbus. This does not affect us and can be ignored.
|
This error originates from browser, that it could not connect to dbus. This does not affect us and can be ignored.
|
||||||
|
|
||||||
|
### Broadcast pipeline not working with some ingest servers
|
||||||
|
|
||||||
|
See [related issue](https://github.com/m1k1o/neko/issues/276).
|
||||||
|
|
||||||
|
```
|
||||||
|
Could not connect to RTMP stream "'rtmp://<ingest-url>/live/<stream-key-removed> live=1'" for writing
|
||||||
|
```
|
||||||
|
|
||||||
|
Some ingest servers require `live=1` parameter in the URL (e.g. nginx-rtmp-module). Some do not and do not accept aphostrophes (e.g. owncast). You can try to change the pipeline to:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
NEKO_BROADCAST_PIPELINE: "flvmux name=mux ! rtmpsink location={url} pulsesrc device={device} ! audio/x-raw,channels=2 ! audioconvert ! voaacenc ! mux. ximagesrc display-name={display} show-pointer=false use-damage=false ! video/x-raw,framerate=28/1 ! videoconvert ! queue ! x264enc bframes=0 key-int-max=0 byte-stream=true tune=zerolatency speed-preset=veryfast ! mux."
|
||||||
|
```
|
||||||
|
17
server/build
17
server/build
@ -1,24 +1,35 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -ex
|
#
|
||||||
|
# aborting if any command returns a non-zero value
|
||||||
|
set -e
|
||||||
|
|
||||||
BUILD_TIME=`date -u +'%Y-%m-%dT%H:%M:%SZ'`
|
BUILD_TIME=`date -u +'%Y-%m-%dT%H:%M:%SZ'`
|
||||||
|
|
||||||
#
|
#
|
||||||
# set git build variables if git exists
|
# set git build variables if git exists
|
||||||
if git status > /dev/null 2>&1 && [ -z $GIT_COMMIT ] && [ -z $GIT_BRANCH ] && [ -z $GIT_DIRTY ];
|
if git status > /dev/null 2>&1 && [ -z $GIT_COMMIT ] && [ -z $GIT_BRANCH ] && [ -z $GIT_TAG ];
|
||||||
then
|
then
|
||||||
GIT_COMMIT=`git rev-parse --short HEAD`
|
GIT_COMMIT=`git rev-parse --short HEAD`
|
||||||
GIT_BRANCH=`git rev-parse --symbolic-full-name --abbrev-ref HEAD`
|
GIT_BRANCH=`git rev-parse --symbolic-full-name --abbrev-ref HEAD`
|
||||||
|
GIT_TAG=`git tag --points-at $GIT_COMMIT | head -n 1`
|
||||||
GIT_DIRTY=`git diff-index --quiet HEAD -- || echo "✗-"`
|
GIT_DIRTY=`git diff-index --quiet HEAD -- || echo "✗-"`
|
||||||
|
GIT_COMMIT="${GIT_DIRTY}${GIT_COMMIT}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# load dependencies
|
||||||
|
go get -v -t -d .
|
||||||
|
|
||||||
|
#
|
||||||
|
# build server
|
||||||
go build \
|
go build \
|
||||||
-o bin/neko \
|
-o bin/neko \
|
||||||
-ldflags "
|
-ldflags "
|
||||||
-s -w
|
-s -w
|
||||||
-X 'm1k1o/neko.buildDate=${BUILD_TIME}'
|
-X 'm1k1o/neko.buildDate=${BUILD_TIME}'
|
||||||
-X 'm1k1o/neko.gitCommit=${GIT_DIRTY}${GIT_COMMIT}'
|
-X 'm1k1o/neko.gitCommit=${GIT_COMMIT}'
|
||||||
-X 'm1k1o/neko.gitBranch=${GIT_BRANCH}'
|
-X 'm1k1o/neko.gitBranch=${GIT_BRANCH}'
|
||||||
|
-X 'm1k1o/neko.gitTag=${GIT_TAG}'
|
||||||
" \
|
" \
|
||||||
cmd/neko/main.go;
|
cmd/neko/main.go;
|
||||||
|
@ -5,6 +5,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"m1k1o/neko/internal/capture"
|
"m1k1o/neko/internal/capture"
|
||||||
"m1k1o/neko/internal/config"
|
"m1k1o/neko/internal/config"
|
||||||
@ -25,7 +26,7 @@ const Header = `&34
|
|||||||
/ |/ / _ \/ //_/ __ \ ) ( ')
|
/ |/ / _ \/ //_/ __ \ ) ( ')
|
||||||
/ /| / __/ ,< / /_/ / ( / )
|
/ /| / __/ ,< / /_/ / ( / )
|
||||||
/_/ |_/\___/_/|_|\____/ \(__)|
|
/_/ |_/\___/_/|_|\____/ \(__)|
|
||||||
&1&37 nurdism/m1k1o &33%s v%s&0
|
&1&37 nurdism/m1k1o &33%s %s&0
|
||||||
`
|
`
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -35,13 +36,8 @@ var (
|
|||||||
gitCommit = "dev"
|
gitCommit = "dev"
|
||||||
//
|
//
|
||||||
gitBranch = "dev"
|
gitBranch = "dev"
|
||||||
|
//
|
||||||
// Major version when you make incompatible API changes,
|
gitTag = "dev"
|
||||||
major = "2"
|
|
||||||
// Minor version when you add functionality in a backwards-compatible manner, and
|
|
||||||
minor = "8"
|
|
||||||
// Patch version when you make backwards-compatible bug fixes.
|
|
||||||
patch = "0"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var Service *Neko
|
var Service *Neko
|
||||||
@ -49,11 +45,9 @@ var Service *Neko
|
|||||||
func init() {
|
func init() {
|
||||||
Service = &Neko{
|
Service = &Neko{
|
||||||
Version: &Version{
|
Version: &Version{
|
||||||
Major: major,
|
|
||||||
Minor: minor,
|
|
||||||
Patch: patch,
|
|
||||||
GitCommit: gitCommit,
|
GitCommit: gitCommit,
|
||||||
GitBranch: gitBranch,
|
GitBranch: gitBranch,
|
||||||
|
GitTag: gitTag,
|
||||||
BuildDate: buildDate,
|
BuildDate: buildDate,
|
||||||
GoVersion: runtime.Version(),
|
GoVersion: runtime.Version(),
|
||||||
Compiler: runtime.Compiler,
|
Compiler: runtime.Compiler,
|
||||||
@ -69,11 +63,9 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Version struct {
|
type Version struct {
|
||||||
Major string
|
|
||||||
Minor string
|
|
||||||
Patch string
|
|
||||||
GitCommit string
|
GitCommit string
|
||||||
GitBranch string
|
GitBranch string
|
||||||
|
GitTag string
|
||||||
BuildDate string
|
BuildDate string
|
||||||
GoVersion string
|
GoVersion string
|
||||||
Compiler string
|
Compiler string
|
||||||
@ -81,20 +73,25 @@ type Version struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (i *Version) String() string {
|
func (i *Version) String() string {
|
||||||
return fmt.Sprintf("%s.%s.%s %s", i.Major, i.Minor, i.Patch, i.GitCommit)
|
version := i.GitTag
|
||||||
|
if version == "" || version == "dev" {
|
||||||
|
version = i.GitBranch
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Sprintf("%s@%s", version, i.GitCommit)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i *Version) Details() string {
|
func (i *Version) Details() string {
|
||||||
return fmt.Sprintf(
|
return "\n" + strings.Join([]string{
|
||||||
"%s\n%s\n%s\n%s\n%s\n%s\n%s\n",
|
fmt.Sprintf("Version %s", i.String()),
|
||||||
fmt.Sprintf("Version %s.%s.%s", i.Major, i.Minor, i.Patch),
|
|
||||||
fmt.Sprintf("GitCommit %s", i.GitCommit),
|
fmt.Sprintf("GitCommit %s", i.GitCommit),
|
||||||
fmt.Sprintf("GitBranch %s", i.GitBranch),
|
fmt.Sprintf("GitBranch %s", i.GitBranch),
|
||||||
|
fmt.Sprintf("GitTag %s", i.GitTag),
|
||||||
fmt.Sprintf("BuildDate %s", i.BuildDate),
|
fmt.Sprintf("BuildDate %s", i.BuildDate),
|
||||||
fmt.Sprintf("GoVersion %s", i.GoVersion),
|
fmt.Sprintf("GoVersion %s", i.GoVersion),
|
||||||
fmt.Sprintf("Compiler %s", i.Compiler),
|
fmt.Sprintf("Compiler %s", i.Compiler),
|
||||||
fmt.Sprintf("Platform %s", i.Platform),
|
fmt.Sprintf("Platform %s", i.Platform),
|
||||||
)
|
}, "\n") + "\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
type Neko struct {
|
type Neko struct {
|
||||||
|
Reference in New Issue
Block a user