@@ -48,7 +48,7 @@ var errInvalidArchive = errors.New("invalid archive")
4848// Produces a tar using OCI style file markers for deletions. Deleted
4949// files will be prepended with the prefix ".wh.". This style is
5050// based off AUFS whiteouts.
51- // See https://github.com/opencontainers/image-spec/blob/master /layer.md
51+ // See https://github.com/opencontainers/image-spec/blob/main /layer.md
5252func Diff (ctx context.Context , a , b string ) io.ReadCloser {
5353 r , w := io .Pipe ()
5454
@@ -68,7 +68,7 @@ func Diff(ctx context.Context, a, b string) io.ReadCloser {
6868// Produces a tar using OCI style file markers for deletions. Deleted
6969// files will be prepended with the prefix ".wh.". This style is
7070// based off AUFS whiteouts.
71- // See https://github.com/opencontainers/image-spec/blob/master /layer.md
71+ // See https://github.com/opencontainers/image-spec/blob/main /layer.md
7272func WriteDiff (ctx context.Context , w io.Writer , a , b string , opts ... WriteDiffOpt ) error {
7373 var options WriteDiffOptions
7474 for _ , opt := range opts {
@@ -89,7 +89,7 @@ func WriteDiff(ctx context.Context, w io.Writer, a, b string, opts ...WriteDiffO
8989// Produces a tar using OCI style file markers for deletions. Deleted
9090// files will be prepended with the prefix ".wh.". This style is
9191// based off AUFS whiteouts.
92- // See https://github.com/opencontainers/image-spec/blob/master /layer.md
92+ // See https://github.com/opencontainers/image-spec/blob/main /layer.md
9393func writeDiffNaive (ctx context.Context , w io.Writer , a , b string , _ WriteDiffOptions ) error {
9494 cw := NewChangeWriter (w , b )
9595 err := fs .Changes (ctx , a , b , cw .HandleChange )
@@ -102,7 +102,7 @@ func writeDiffNaive(ctx context.Context, w io.Writer, a, b string, _ WriteDiffOp
102102const (
103103 // whiteoutPrefix prefix means file is a whiteout. If this is followed by a
104104 // filename this means that file has been removed from the base layer.
105- // See https://github.com/opencontainers/image-spec/blob/master /layer.md#whiteouts
105+ // See https://github.com/opencontainers/image-spec/blob/main /layer.md#whiteouts
106106 whiteoutPrefix = ".wh."
107107
108108 // whiteoutMetaPrefix prefix means whiteout has a special meaning and is not
@@ -118,7 +118,7 @@ const (
118118)
119119
120120// Apply applies a tar stream of an OCI style diff tar.
121- // See https://github.com/opencontainers/image-spec/blob/master /layer.md#applying-changesets
121+ // See https://github.com/opencontainers/image-spec/blob/main /layer.md#applying-changesets
122122func Apply (ctx context.Context , root string , r io.Reader , opts ... ApplyOpt ) (int64 , error ) {
123123 root = filepath .Clean (root )
124124
@@ -140,7 +140,7 @@ func Apply(ctx context.Context, root string, r io.Reader, opts ...ApplyOpt) (int
140140
141141// applyNaive applies a tar stream of an OCI style diff tar to a directory
142142// applying each file as either a whole file or whiteout.
143- // See https://github.com/opencontainers/image-spec/blob/master /layer.md#applying-changesets
143+ // See https://github.com/opencontainers/image-spec/blob/main /layer.md#applying-changesets
144144func applyNaive (ctx context.Context , root string , r io.Reader , options ApplyOptions ) (size int64 , err error ) {
145145 var (
146146 dirs []* tar.Header
@@ -469,7 +469,7 @@ func mkparent(ctx context.Context, path, root string, parents []string) error {
469469// This should be used combining with continuity's diff computing functionality
470470// (e.g. `fs.Change` of github.com/containerd/continuity/fs).
471471//
472- // See also https://github.com/opencontainers/image-spec/blob/master /layer.md for details
472+ // See also https://github.com/opencontainers/image-spec/blob/main /layer.md for details
473473// about OCI layers
474474type ChangeWriter struct {
475475 tw * tar.Writer
0 commit comments