INNER CODE UNIT · Go

func

minekube/gate · ci_write_token_isolation_test.go:41

func (n *ciIsolationNeeds) UnmarshalYAML(node *yaml.Node) error {
	switch node.Kind {
	case yaml.ScalarNode:
		*n = []string{node.Value}
		return nil
	case yaml.SequenceNode:
		var needs []string
		if err := node.Decode(&needs); err != nil {
			return err
		}
		*n = needs
		return nil
	default:
		return fmt.Errorf("needs must be a string or list, got YAML kind %d", node.Kind)
	}
}

func readCIIsolationWorkflow(t *testing.T) (ciIsolationWorkflow, string) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…