mirror of
https://github.com/thegeeklab/drone-plugin-lib.git
synced 2024-11-22 00:40:39 +00:00
Add String() implementations for some structs (#20)
This commit is contained in:
parent
be2c206c20
commit
5113109fd1
@ -55,6 +55,10 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
func (c Commit) String() string {
|
||||
return c.SHA
|
||||
}
|
||||
|
||||
func (a Author) String() string {
|
||||
return a.Username
|
||||
}
|
||||
|
@ -37,3 +37,7 @@ type Repo struct {
|
||||
// Private to show if the repo is private.
|
||||
Private bool
|
||||
}
|
||||
|
||||
func (r Repo) String() string {
|
||||
return r.Slug
|
||||
}
|
||||
|
@ -37,3 +37,7 @@ type SemVer struct {
|
||||
// Error is the semantic version parsing error if the tag was invalid.
|
||||
Error string
|
||||
}
|
||||
|
||||
func (s SemVer) String() string {
|
||||
return s.Version
|
||||
}
|
||||
|
@ -5,9 +5,7 @@
|
||||
|
||||
package drone
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
import "time"
|
||||
|
||||
// Stage represents a build stage.
|
||||
type Stage struct {
|
||||
@ -62,3 +60,7 @@ type Stage struct {
|
||||
// DependsOn is a list of dependencies for the current build stage.
|
||||
DependsOn []string
|
||||
}
|
||||
|
||||
func (s Stage) String() string {
|
||||
return s.Name
|
||||
}
|
||||
|
@ -13,3 +13,7 @@ type Step struct {
|
||||
// Number is the numeric value of the step.
|
||||
Number int
|
||||
}
|
||||
|
||||
func (s Step) String() string {
|
||||
return s.Name
|
||||
}
|
||||
|
@ -16,3 +16,7 @@ type System struct {
|
||||
// Version for the system version.
|
||||
Version string
|
||||
}
|
||||
|
||||
func (s System) String() string {
|
||||
return s.Host
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user