| 1 | // Copyright 2025 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | package modindex |
| 6 | |
| 7 | // backdoors for tests |
| 8 | |
| 9 | var Uniquify = uniquify |
| 10 | |
| 11 | // Create always creates a new index for the |
| 12 | // specified Go module cache directory. |
| 13 | // On success it returns the current index. |
| 14 | func Create(gomodcache string) (*Index, error) { |
| 15 | return update(gomodcache, nil) |
| 16 | } |