trpc.group/trpc-go/trpc-go@v1.0.3/version.go (about) 1 // 2 // 3 // Tencent is pleased to support the open source community by making tRPC available. 4 // 5 // Copyright (C) 2023 THL A29 Limited, a Tencent company. 6 // All rights reserved. 7 // 8 // If you have downloaded a copy of the tRPC source code from Tencent, 9 // please note that tRPC source code is licensed under the Apache 2.0 License, 10 // A copy of the Apache 2.0 License is included in this file. 11 // 12 // 13 14 package trpc 15 16 import "fmt" 17 18 // rule of trpc version 19 // 1. MAJOR version when you make incompatible API changes; 20 // 2. MINOR version when you add functionality in a backwards-compatible manner; 21 // 3. PATCH version when you make backwards-compatible bug fixes; 22 // 4. Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format; 23 // alpha 0.1.0-alpha 24 // beta 0.1.0-beta 25 // release candidate 0.1.0-rc 26 // release 0.1.0 27 const ( 28 MajorVersion = 0 29 MinorVersion = 14 30 PatchVersion = 0 31 VersionSuffix = "-dev" // -alpha -alpha.1 -beta -rc -rc.1 32 ) 33 34 // Version returns the version of trpc. 35 func Version() string { 36 return fmt.Sprintf("v%d.%d.%d%s", MajorVersion, MinorVersion, PatchVersion, VersionSuffix) 37 }