()
| 906 | } |
| 907 | |
| 908 | func getAppList() (*dto.AppList, error) { |
| 909 | list := &dto.AppList{} |
| 910 | if err := getAppFromRepo(fmt.Sprintf("%s/%s/1panel.json.zip", global.AppRepoURL(), global.CONF.Base.Mode)); err != nil { |
| 911 | return nil, err |
| 912 | } |
| 913 | listFile := filepath.Join(global.Dir.ResourceDir, "1panel.json") |
| 914 | file, err := os.Open(listFile) |
| 915 | if err != nil { |
| 916 | return nil, err |
| 917 | } |
| 918 | defer file.Close() |
| 919 | if err = json.NewDecoder(file).Decode(list); err != nil { |
| 920 | return nil, err |
| 921 | } |
| 922 | |
| 923 | return list, nil |
| 924 | } |
| 925 | |
| 926 | var InitTypes = map[string]struct{}{ |
| 927 | "runtime": {}, |
no test coverage detected