version.go raw

   1  /**
   2   * Copyright 2016-2024 IBM Corp.
   3   *
   4   * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
   5   * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
   6   *
   7   * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
   8   * on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   9   * See the License for the specific language governing permissions and limitations under the License.
  10   */
  11  
  12  // AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
  13  
  14  package sl
  15  
  16  import "fmt"
  17  
  18  type VersionInfo struct {
  19  	Major int
  20  	Minor int
  21  	Patch int
  22  	Pre   string
  23  }
  24  
  25  var Version = VersionInfo{
  26  	Major: 1,
  27  	Minor: 1,
  28  	Patch: 3,
  29  	Pre:   "",
  30  }
  31  
  32  func (v VersionInfo) String() string {
  33  	result := fmt.Sprintf("v%d.%d.%d", v.Major, v.Minor, v.Patch)
  34  
  35  	if v.Pre != "" {
  36  		result += fmt.Sprintf("-%s", v.Pre)
  37  	}
  38  
  39  	return result
  40  }
  41