Skip to content
This repository has been archived by the owner on Aug 20, 2021. It is now read-only.

Commit

Permalink
Remove previous version of opencontrol2oscal generator
Browse files Browse the repository at this point in the history
  • Loading branch information
isimluk committed Feb 4, 2020
1 parent b5e0a56 commit c67b717
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 217 deletions.
165 changes: 0 additions & 165 deletions types/oscal/opencontrol.go

This file was deleted.

52 changes: 0 additions & 52 deletions types/oscal/oscal.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,58 +70,6 @@ func (o *OSCAL) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
return nil
}

// NewFromOC initializes an OSCAL type from raw docker data
// func NewFromOC(options dockerOptions) (*OSCAL, error) {
// ocFile, err := os.Open(options.dockerYAMLFilepath)
// if err != nil {
// return nil, err
// }
// defer ocFile.Close()

// rawOC, err := ioutil.ReadAll(ocFile)
// if err != nil {
// return nil, err
// }

// var oc docker.docker
// if err := yaml.Unmarshal(rawOC, &oc); err != nil {
// return nil, err
// }

// ocComponentFileList := []string{}
// filepath.Walk(filepath.Join(options.dockersDir, "components/"), func(path string, f os.FileInfo, err error) error {
// if !f.IsDir() && (filepath.Ext(path) == ".yaml" || filepath.Ext(path) == ".yml") {
// absPath, err := filepath.Abs(path)
// if err != nil {
// return err
// }
// ocComponentFileList = append(ocComponentFileList, absPath)
// }

// return nil
// })

// ocComponents := []docker.Component{}
// for _, ocComponentFilepath := range ocComponentFileList {
// ocComponentFile, err := os.Open(ocComponentFilepath)
// if err != nil {
// return nil, err
// }
// defer ocComponentFile.Close()

// rawOCComponentFile, err := ioutil.ReadAll(ocComponentFile)

// var ocComponent docker.Component
// if err := yaml.Unmarshal(rawOCComponentFile, &ocComponent); err != nil {
// return nil, err
// }

// ocComponents = append(ocComponents, ocComponent)
// }

// return convertOC(oc, ocComponents)
// }

// New returns a concrete OSCAL type from a reader
func New(r io.Reader) (*OSCAL, error) {
oscalBytes, err := ioutil.ReadAll(r)
Expand Down

0 comments on commit c67b717

Please sign in to comment.