File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 66 "os/exec"
77 "path/filepath"
88 "regexp"
9+ "runtime"
910 "strings"
1011
1112 "github.com/coreos/go-semver/semver"
@@ -69,6 +70,8 @@ type doctorFileCheck struct {
6970 info os.FileInfo
7071}
7172
73+ type doctorRuntimeCheck struct {}
74+
7275type doctorSuspiciousFilesCheck struct {
7376 path string
7477 filenames map [string ]bool
@@ -110,6 +113,7 @@ func (c *Config) runDoctorCmd(cmd *cobra.Command, args []string) error {
110113 allOK := true
111114 for _ , dc := range []doctorCheck {
112115 & doctorVersionCheck {},
116+ & doctorRuntimeCheck {},
113117 & doctorDirectoryCheck {
114118 name : "source directory" ,
115119 path : c .SourceDir ,
@@ -369,6 +373,26 @@ func (c *doctorFileCheck) Skip() bool {
369373 return c .canSkip && c .path == ""
370374}
371375
376+ func (doctorRuntimeCheck ) Check () (bool , error ) {
377+ return true , nil
378+ }
379+
380+ func (doctorRuntimeCheck ) Enabled () bool {
381+ return true
382+ }
383+
384+ func (doctorRuntimeCheck ) MustSucceed () bool {
385+ return true
386+ }
387+
388+ func (doctorRuntimeCheck ) Result () string {
389+ return fmt .Sprintf ("runtime.GOOS %s, runtime.GOARCH %s" , runtime .GOOS , runtime .GOARCH )
390+ }
391+
392+ func (doctorRuntimeCheck ) Skip () bool {
393+ return false
394+ }
395+
372396func (c * doctorSuspiciousFilesCheck ) Check () (bool , error ) {
373397 if err := filepath .Walk (c .path , func (path string , info os.FileInfo , err error ) error {
374398 if err != nil {
You can’t perform that action at this time.
0 commit comments