gitee.com/mysnapcore/mysnapd@v0.1.0/cmd/snap/cmd_version_other.go (about) 1 // -*- Mode: Go; indent-tabs-mode: t -*- 2 //go:build !linux 3 // +build !linux 4 5 /* 6 * Copyright (C) 2016 Canonical Ltd 7 * 8 * This program is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License version 3 as 10 * published by the Free Software Foundation. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program. If not, see <http://www.gnu.org/licenses/>. 19 * 20 */ 21 22 package main 23 24 import ( 25 "fmt" 26 "runtime" 27 28 "gitee.com/mysnapcore/mysnapd/client" 29 "gitee.com/mysnapcore/mysnapd/i18n" 30 "gitee.com/mysnapcore/mysnapd/osutil" 31 "gitee.com/mysnapcore/mysnapd/release" 32 ) 33 34 func serverVersion(*client.Client) *client.ServerVersion { 35 return &client.ServerVersion{ 36 Version: i18n.G("unavailable"), 37 Series: release.Series, 38 OSID: runtime.GOOS, 39 OnClassic: true, 40 KernelVersion: fmt.Sprintf("%s (%s)", osutil.KernelVersion(), runtime.GOARCH), 41 } 42 }