1 package state 2 3 import "fmt" 4 5 type ErrAlreadyRunningOnPlatform struct { 6 platform string 7 pid int 8 } 9 10 func NewErrAlreadyRunningOnPlatform(platform string, pid int) ErrAlreadyRunningOnPlatform { 11 return ErrAlreadyRunningOnPlatform{ 12 platform: platform, 13 pid: pid, 14 } 15 } 16 17 func (e ErrAlreadyRunningOnPlatform) Error() string { 18 return fmt.Sprintf("a session with PID %d is already running on platform %q", e.pid, e.platform) 19 } 20