func (f *FakeClient) GetFile(org, repo, file, commit string) ([]byte, error) {
	contents, ok := f.RemoteFiles[file]
	if !ok {
		return nil, fmt.Errorf("could not find file %s", file)
	}
	if commit == "" {
		if master, ok := contents["master"]; ok {
			return []byte(master), nil
		}

		return nil, fmt.Errorf("could not find file %s in master", file)
	}

	if content, ok := contents[commit]; ok {
		return []byte(content), nil
	}

	return nil, fmt.Errorf("could not find file %s with ref %s", file, commit)
}
func (f *FakeClient) GetFile(org, repo, file, commit string) ([]byte, error) {
	contents, ok := f.RemoteFiles[file]
	if !ok {
		return nil, fmt.Errorf("could not find file %s", file)
	}
	if commit == "" {
		if master, ok := contents["master"]; ok {
			return []byte(master), nil
		}

		return nil, fmt.Errorf("could not find file %s in master", file)
	}

	if content, ok := contents[commit]; ok {
		return []byte(content), nil
	}

	return nil, fmt.Errorf("could not find file %s with ref %s", file, commit)
}
func ( f * FakeClient ) GetFile ( org , repo , file , commit string ) ( [ ] byte , error ) { contents , ok := f . RemoteFiles [ file ] if ! ok { return nil , fmt . Errorf ( " " , file ) } if commit == " " { if master , ok := contents [ " " ] ; ok { return [ ] byte ( master ) , nil } return nil , fmt . Errorf ( " " , file ) } if content , ok := contents [ commit ] ; ok { return [ ] byte ( content ) , nil } return nil , fmt . Errorf ( " " , file , commit ) }
// GetFile returns the bytes of the file.
GetFile returns the bytes of the file .