Skip to content

Commit caa7665

Browse files
committed
internal/helm: doc block nitpicks
Signed-off-by: Hidde Beydals <hello@hidde.co>
1 parent 88ff049 commit caa7665

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

internal/helm/chart/dependency_manager.go

+6-3
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ type GetChartRepositoryCallback func(url string) (*repository.ChartRepository, e
4141

4242
// DependencyManager manages dependencies for a Helm chart.
4343
type DependencyManager struct {
44-
// repositories contains a map of Index indexed by their
45-
// normalized URL. It is used as a lookup table for missing
46-
// dependencies.
44+
// repositories contains a map of repository.ChartRepository objects
45+
// indexed by their repository.NormalizeURL.
46+
// It is consulted as a lookup table for missing dependencies, based on
47+
// the (repository) URL the dependency refers to.
4748
repositories map[string]*repository.ChartRepository
4849

4950
// getRepositoryCallback can be set to an on-demand GetChartRepositoryCallback
@@ -91,6 +92,8 @@ func NewDependencyManager(opts ...DependencyManagerOption) *DependencyManager {
9192
return dm
9293
}
9394

95+
// Clear iterates over the repositories, calling Unload and RemoveCache on all
96+
// items. It returns a collection of (cache removal) errors.
9497
func (dm *DependencyManager) Clear() []error {
9598
var errs []error
9699
for _, v := range dm.repositories {

internal/helm/chart/metadata_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2020 The Flux authors
2+
Copyright 2021 The Flux authors
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

internal/helm/repository/chart_repository.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ func (r *ChartRepository) CacheIndex() (string, error) {
285285

286286
// StrategicallyLoadIndex lazy-loads the Index from CachePath using
287287
// LoadFromCache if it does not HasIndex.
288-
// If it not HasCacheFile, a cache attempt is made using CacheIndex
288+
// If not HasCacheFile, a cache attempt is made using CacheIndex
289289
// before continuing to load.
290290
func (r *ChartRepository) StrategicallyLoadIndex() (err error) {
291291
if r.HasIndex() {
@@ -350,7 +350,7 @@ func (r *ChartRepository) HasCacheFile() bool {
350350
}
351351

352352
// Unload can be used to signal the Go garbage collector the Index can
353-
// be freed from memory if the Index object is expected to
353+
// be freed from memory if the ChartRepository object is expected to
354354
// continue to exist in the stack for some time.
355355
func (r *ChartRepository) Unload() {
356356
if r == nil {

0 commit comments

Comments
 (0)