Skip to content

Fix: Add package comments and update linter config #828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ issues:
- linters:
- govet
text: "copylocks"
- linters:
- revive
text: package-comments
- linters:
- staticcheck
text: "Do not rely on the global seed"
Expand Down
1 change: 1 addition & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package client provides utilities for clients of firecracker-containerd.
package client

import "github.com/firecracker-microvm/firecracker-containerd/internal/bundle"
Expand Down
2 changes: 2 additions & 0 deletions docker-credential-mmds/mmds/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package mmds provides a docker credential helper backed by Firecracker's MMDS.
package mmds

import (
Expand Down
2 changes: 2 additions & 0 deletions docker-credential-mmds/mmds/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package mmds provides a docker credential helper backed by Firecracker's MMDS.
package mmds

import (
Expand Down
1 change: 1 addition & 0 deletions eventbridge/eventbridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package eventbridge provides utilities for bridging containerd event streams.
package eventbridge

import (
Expand Down
1 change: 1 addition & 0 deletions firecracker-control/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package client provides a client for the firecracker-control service.
package client

import (
Expand Down
1 change: 1 addition & 0 deletions firecracker-control/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package service implements the firecracker-control service.
package service

const (
Expand Down
1 change: 1 addition & 0 deletions firecracker-control/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package service implements the firecracker-control service.
package service

import (
Expand Down
1 change: 1 addition & 0 deletions firecracker-control/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package service implements the firecracker-control service.
package service

import (
Expand Down
1 change: 1 addition & 0 deletions internal/bundle/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package bundle provides utilities for working with container bundles.
package bundle

import (
Expand Down
1 change: 1 addition & 0 deletions internal/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package internal contains internal utilities.
package internal

import (
Expand Down
1 change: 1 addition & 0 deletions internal/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package internal contains internal utilities.
package internal

import (
Expand Down
1 change: 1 addition & 0 deletions internal/cpu_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package internal contains internal utilities.
package internal

import (
Expand Down
1 change: 1 addition & 0 deletions internal/cpu_template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package internal contains internal utilities.
package internal

import (
Expand Down
1 change: 1 addition & 0 deletions internal/debug/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package debug provides utilities for handling multi-level logging.
package debug

import (
Expand Down
1 change: 1 addition & 0 deletions internal/debug/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package debug provides utilities for handling multi-level logging.
package debug

import (
Expand Down
1 change: 1 addition & 0 deletions internal/event/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package event provides event-related utilities.
package event

import (
Expand Down
1 change: 1 addition & 0 deletions internal/fsutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package internal contains internal utilities.
package internal

import (
Expand Down
1 change: 1 addition & 0 deletions internal/integtest/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package integtest provides integration testing utilities.
package integtest

import (
Expand Down
1 change: 1 addition & 0 deletions internal/integtest/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package integtest provides integration testing utilities.
package integtest

import (
Expand Down
5 changes: 4 additions & 1 deletion internal/integtest/firecracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package integtest provides integration testing utilities.
package integtest

import "github.com/firecracker-microvm/firecracker-containerd/firecracker-control/client"
import (
"github.com/firecracker-microvm/firecracker-containerd/firecracker-control/client"
)

// NewFCControlClient returns a Firecracker control client for the given socket.
func NewFCControlClient(socket string) (*client.Client, error) {
Expand Down
1 change: 1 addition & 0 deletions internal/integtest/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package integtest provides integration testing utilities.
package integtest

import (
Expand Down
1 change: 1 addition & 0 deletions internal/integtest/prepare.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package integtest provides integration testing utilities.
package integtest

import (
Expand Down
1 change: 1 addition & 0 deletions internal/integtest/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package integtest provides integration testing utilities.
package integtest

import (
Expand Down
1 change: 1 addition & 0 deletions internal/integtest/shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package integtest provides integration testing utilities.
package integtest

import "os"
Expand Down
1 change: 1 addition & 0 deletions internal/network_test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package internal contains internal utilities.
package internal

import (
Expand Down
1 change: 1 addition & 0 deletions internal/psutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package internal contains internal utilities.
package internal

import (
Expand Down
1 change: 1 addition & 0 deletions internal/shim/shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package shim provides firecracker-containerd specific shim utilities.
package shim

import (
Expand Down
1 change: 1 addition & 0 deletions internal/testutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package internal contains internal utilities.
package internal

import (
Expand Down
1 change: 1 addition & 0 deletions internal/vm/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package vm provides utilities for managing the VM.
package vm

import (
Expand Down
1 change: 1 addition & 0 deletions internal/vm/fifo.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package vm provides utilities for managing the VM.
package vm

import (
Expand Down
1 change: 1 addition & 0 deletions internal/vm/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package vm provides utilities for managing the VM.
package vm

import (
Expand Down
1 change: 1 addition & 0 deletions internal/vm/oci.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
limitations under the License.
*/

// Package vm provides utilities for managing the VM.
package vm

import (
Expand Down
1 change: 1 addition & 0 deletions internal/vm/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package vm provides utilities for managing the VM.
package vm

import (
Expand Down
1 change: 1 addition & 0 deletions internal/vm/task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package vm provides utilities for managing the VM.
package vm

import (
Expand Down
1 change: 1 addition & 0 deletions internal/vm/vsock.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package vm provides utilities for managing the VM.
package vm

import (
Expand Down
1 change: 1 addition & 0 deletions runtime/cpuset/cpuset_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package cpuset provides a builder for creating cpuset configurations.
package cpuset

import (
Expand Down
1 change: 1 addition & 0 deletions runtime/firecrackeroci/annotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package firecrackeroci provides OCI utilities specific to firecracker-containerd.
package firecrackeroci

import (
Expand Down
1 change: 1 addition & 0 deletions runtime/firecrackeroci/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package firecrackeroci provides OCI utilities specific to firecracker-containerd.
package firecrackeroci

import (
Expand Down
14 changes: 1 addition & 13 deletions runtime/firecrackeroci/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Package firecrackeroci provides OCI utilities specific to firecracker-containerd.
package firecrackeroci

import (
Expand Down
1 change: 1 addition & 0 deletions runtime/vm/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package vm provides utilities for managing the VM.
package vm

import (
Expand Down
1 change: 1 addition & 0 deletions snapshotter/app/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package app provides the entrypoint for the demux snapshotter.
package app

import (
Expand Down
1 change: 1 addition & 0 deletions snapshotter/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package config defines the configuration for the demux snapshotter.
package config

import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
license that can be found in the NOTICE.md file.
*/

// Package config provides constants for stargz snapshotter integration tests.
package config

const (
Expand Down
1 change: 1 addition & 0 deletions snapshotter/internal/mount/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package mount provides utilities for mount points.
package mount

import "github.com/containerd/containerd/mount"
Expand Down
1 change: 1 addition & 0 deletions volume/guest_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package volume provides functionality for volume management.
package volume

import (
Expand Down
1 change: 1 addition & 0 deletions volume/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// express or implied. See the License for the specific language governing
// permissions and limitations under the License.

// Package volume provides functionality for volume management.
package volume

import (
Expand Down
Loading