~snappy-dev/snappy/trunk-github

« back to all changes in this revision

Viewing changes to asserts/snap_asserts.go

  • Committer: Zygmunt Krynicki
  • Date: 2016-02-05 11:26:28 UTC
  • mfrom: (1131)
  • mto: This revision was merged to the branch mainline in revision 1137.
  • Revision ID: git-v1:2f4cd12f5eb1dde16f4e7b59561026d0d125f377
Merge branch 'master' of github.com:ubuntu-core/snappy into cmd-output-testing

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
}
68
68
 
69
69
func assembleSnapBuild(assert assertionBase) (Assertion, error) {
70
 
        _, err := checkMandatory(assert.headers, "snap-id")
71
 
        if err != nil {
72
 
                return nil, err
73
 
        }
74
 
 
75
 
        // TODO: more parsing/checking of this here?
76
 
        _, err = checkMandatory(assert.headers, "snap-digest")
77
 
        if err != nil {
78
 
                return nil, err
79
 
        }
80
 
 
81
 
        _, err = checkMandatory(assert.headers, "grade")
 
70
        // TODO: more parsing/checking of snap-digest
 
71
 
 
72
        _, err := checkMandatory(assert.headers, "grade")
82
73
        if err != nil {
83
74
                return nil, err
84
75
        }
153
144
}
154
145
 
155
146
func assembleSnapRevision(assert assertionBase) (Assertion, error) {
156
 
        _, err := checkMandatory(assert.headers, "snap-id")
157
 
        if err != nil {
158
 
                return nil, err
159
 
        }
160
 
 
161
 
        // TODO: more parsing/checking of this here?
162
 
        _, err = checkMandatory(assert.headers, "snap-digest")
163
 
        if err != nil {
164
 
                return nil, err
165
 
        }
 
147
        // TODO: more parsing/checking of snap-digest
166
148
 
167
149
        snapRevision, err := checkUint(assert.headers, "snap-revision", 64)
168
150
        if err != nil {