File tree 3 files changed +58
-5
lines changed
3 files changed +58
-5
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ import (
28
28
"strings"
29
29
"sync"
30
30
"syscall"
31
- "time"
32
31
33
32
v1 "github.com/google/go-containerregistry/pkg/v1"
34
33
"github.com/pkg/errors"
@@ -306,10 +305,6 @@ func tarHeaderToStat_t(hdr *tar.Header) *syscall.Stat_t {
306
305
}
307
306
}
308
307
309
- func timespec (t time.Time ) syscall.Timespec {
310
- return syscall.Timespec {Sec : t .Unix (), Nsec : int64 (t .Nanosecond ())}
311
- }
312
-
313
308
// hashFile hashes the gievn file, implementation must match util.CacheHasher.
314
309
func hashFile (hdr * tar.Header , r io.Reader ) ([]byte , error ) {
315
310
fi := hdr .FileInfo ()
Original file line number Diff line number Diff line change
1
+ //go:build arm && linux
2
+ // +build arm,linux
3
+
4
+ /*
5
+ Copyright 2018 Google LLC
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
18
+ */
19
+
20
+ package imagefs
21
+
22
+ import (
23
+ "syscall"
24
+ "time"
25
+ )
26
+
27
+ func timespec (t time.Time ) syscall.Timespec {
28
+ return syscall.Timespec {Sec : int32 (t .Unix ()), Nsec : int32 (t .Nanosecond ())}
29
+ }
Original file line number Diff line number Diff line change
1
+ //go:build !arm && linux
2
+ // +build !arm,linux
3
+
4
+ /*
5
+ Copyright 2018 Google LLC
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
18
+ */
19
+
20
+ package imagefs
21
+
22
+ import (
23
+ "syscall"
24
+ "time"
25
+ )
26
+
27
+ func timespec (t time.Time ) syscall.Timespec {
28
+ return syscall.Timespec {Sec : t .Unix (), Nsec : int64 (t .Nanosecond ())}
29
+ }
You can’t perform that action at this time.
0 commit comments