~nskaggs/+junk/xenial-test

« back to all changes in this revision

Viewing changes to src/github.com/joyent/gocommon/version.go

  • Committer: Nicholas Skaggs
  • Date: 2016-10-24 20:56:05 UTC
  • Revision ID: nicholas.skaggs@canonical.com-20161024205605-z8lta0uvuhtxwzwl
Initi with beta15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *
 
3
 * gocommon - Go library to interact with the JoyentCloud
 
4
 *
 
5
 *
 
6
 * Copyright (c) 2016 Joyent Inc.
 
7
 *
 
8
 * Written by Daniele Stroppa <daniele.stroppa@joyent.com>
 
9
 *
 
10
 * This Source Code Form is subject to the terms of the Mozilla Public
 
11
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 
12
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
13
 */
 
14
 
 
15
package gocommon
 
16
 
 
17
import (
 
18
        "fmt"
 
19
)
 
20
 
 
21
type VersionNum struct {
 
22
        Major int
 
23
        Minor int
 
24
        Micro int
 
25
}
 
26
 
 
27
func (v *VersionNum) String() string {
 
28
        return fmt.Sprintf("%d.%d.%d", v.Major, v.Minor, v.Micro)
 
29
}
 
30
 
 
31
var VersionNumber = VersionNum{
 
32
        Major: 0,
 
33
        Minor: 1,
 
34
        Micro: 0,
 
35
}
 
36
 
 
37
var Version = VersionNumber.String()