Skip to content

Commit 1747744

Browse files
committed
chore: update protocol version to 1.0.1
- Incremented the FARP protocol version from 1.0.0 to 1.0.1, updating the patch version to reflect minor changes. - Added missing periods to comments for consistency and clarity.
1 parent 1f017ac commit 1747744

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

version.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@ package farp
22

33
import "fmt"
44

5-
// Protocol version constants
5+
// Protocol version constants.
66
const (
7-
// ProtocolVersion is the current FARP protocol version (semver)
8-
ProtocolVersion = "1.0.0"
7+
// ProtocolVersion is the current FARP protocol version (semver).
8+
ProtocolVersion = "1.0.1"
99

10-
// ProtocolMajor is the major version
10+
// ProtocolMajor is the major version.
1111
ProtocolMajor = 1
1212

13-
// ProtocolMinor is the minor version
13+
// ProtocolMinor is the minor version.
1414
ProtocolMinor = 0
1515

16-
// ProtocolPatch is the patch version
17-
ProtocolPatch = 0
16+
// ProtocolPatch is the patch version.
17+
ProtocolPatch = 1
1818
)
1919

20-
// VersionInfo provides version information about the protocol
20+
// VersionInfo provides version information about the protocol.
2121
type VersionInfo struct {
2222
// Version is the full semver string
2323
Version string `json:"version"`
@@ -32,7 +32,7 @@ type VersionInfo struct {
3232
Patch int `json:"patch"`
3333
}
3434

35-
// GetVersion returns the current protocol version information
35+
// GetVersion returns the current protocol version information.
3636
func GetVersion() VersionInfo {
3737
return VersionInfo{
3838
Version: ProtocolVersion,
@@ -44,10 +44,11 @@ func GetVersion() VersionInfo {
4444

4545
// IsCompatible checks if a manifest version is compatible with this protocol version
4646
// Compatible means the major version matches and the manifest's minor version
47-
// is less than or equal to the protocol's minor version
47+
// is less than or equal to the protocol's minor version.
4848
func IsCompatible(manifestVersion string) bool {
4949
// Parse manifest version (simple parsing for semver)
5050
var major, minor, patch int
51+
5152
_, err := fmt.Sscanf(manifestVersion, "%d.%d.%d", &major, &minor, &patch)
5253
if err != nil {
5354
return false
@@ -61,4 +62,3 @@ func IsCompatible(manifestVersion string) bool {
6162
// Protocol must support manifest's minor version or higher
6263
return minor <= ProtocolMinor
6364
}
64-

0 commit comments

Comments
 (0)