我需要从golang程序创建bash.sh文件,该文件应该执行以下操作:
创建的ForEach上依赖回路和读取的类型和根据打印类型不同的回波消息(命令)我需要它一起工作开关
对type与Golang的依赖性的
例如以下内容
对于每个依赖项,添加echo的类型消息
#!/bin/bash
for a in $(dependencies.type)
echo $runner //from type
done
Run Code Online (Sandbox Code Playgroud)
我做的是以下哪些不起作用
包主
import (
"fmt"
"log"
"text/template"
"gopkg.in/yaml.v2"
"os"
)
type File struct {
TypeVersion string `yaml:"_type-version"`
Dependency []Dependency
}
type Dependency struct {
Name string
Type string
CWD string
Install []Install
}
type Install map[string]string
var data = `
_type-version: "1.0.0"
dependency:
- name: ui
type: runner …Run Code Online (Sandbox Code Playgroud)