code: func Runtime(t api.TaskSpec) (string, error) {
  	switch r := t.GetRuntime().(type) {
  	case *api.TaskSpec_Attachment:
  		return "attachment", nil
  	case *api.TaskSpec_Container:
  		return "container", nil
  	case *api.TaskSpec_Generic:
  		return strings.ToLower(r.Generic.Kind), nil
  	default:
  		return "", errUnknownRuntime
  	}
  }
docs: // TODO(stevvooe): Consolidate "Hostname" style validation here.
  // Runtime returns the runtime name from a given spec.