treewide: add license header and enable haslicense linter

Change-Id: I873a8d4082d75e8f813d8a726a41187eea7a065e
Reviewed-on: https://review.monogon.dev/c/monogon/+/3825
Tested-by: Jenkins CI
Reviewed-by: Leopold Schabel <leo@monogon.tech>
diff --git a/go/algorithm/cartesian/cartesian.go b/go/algorithm/cartesian/cartesian.go
index fb42a2b..54079b8 100644
--- a/go/algorithm/cartesian/cartesian.go
+++ b/go/algorithm/cartesian/cartesian.go
@@ -1,3 +1,6 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
 package cartesian
 
 // Product returns cartesian product of arguments. Each argument must be a slice
diff --git a/go/algorithm/cartesian/cartesian_test.go b/go/algorithm/cartesian/cartesian_test.go
index 5911ecc..9834483 100644
--- a/go/algorithm/cartesian/cartesian_test.go
+++ b/go/algorithm/cartesian/cartesian_test.go
@@ -1,3 +1,6 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
 package cartesian
 
 import (
diff --git a/go/algorithm/toposort/toposort.go b/go/algorithm/toposort/toposort.go
index 07ee267..892172f 100644
--- a/go/algorithm/toposort/toposort.go
+++ b/go/algorithm/toposort/toposort.go
@@ -1,3 +1,6 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
 package toposort
 
 import (
diff --git a/go/algorithm/toposort/toposort_test.go b/go/algorithm/toposort/toposort_test.go
index e2ab8e7..22ca914 100644
--- a/go/algorithm/toposort/toposort_test.go
+++ b/go/algorithm/toposort/toposort_test.go
@@ -1,3 +1,6 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
 package toposort
 
 import (
diff --git a/go/clitable/table.go b/go/clitable/table.go
index ce1f7fa..177f3cd 100644
--- a/go/clitable/table.go
+++ b/go/clitable/table.go
@@ -1,3 +1,6 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
 // Package clitable implements tabular display for command line tools.
 //
 // The generated tables are vaguely reminiscent of the output of 'kubectl'. For
diff --git a/go/clitable/table_test.go b/go/clitable/table_test.go
index a84e8b1..1ba4496 100644
--- a/go/clitable/table_test.go
+++ b/go/clitable/table_test.go
@@ -1,3 +1,6 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
 package clitable
 
 import (
diff --git a/go/logging/backend.go b/go/logging/backend.go
index 2fe4556..19c1bab 100644
--- a/go/logging/backend.go
+++ b/go/logging/backend.go
@@ -1,3 +1,6 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
 package logging
 
 import (
diff --git a/go/logging/leveled.go b/go/logging/leveled.go
index a32b62d..45dfc14 100644
--- a/go/logging/leveled.go
+++ b/go/logging/leveled.go
@@ -1,3 +1,6 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
 package logging
 
 // Leveled is a generic interface for glog-style logging. There are four
diff --git a/go/mflags/limiter.go b/go/mflags/limiter.go
index c085b52..2296917 100644
--- a/go/mflags/limiter.go
+++ b/go/mflags/limiter.go
@@ -1,3 +1,6 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
 // Package mflags implements custom flags for use in monogon projects.
 // It provides them to be used like normal flag.$Var and registers the
 // required flag functions.
diff --git a/go/net/psample/psample_test.go b/go/net/psample/psample_test.go
index b01ad97..6be8b4e 100644
--- a/go/net/psample/psample_test.go
+++ b/go/net/psample/psample_test.go
@@ -1,3 +1,6 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
 // This test requires the following Linux kernel configuration options to be
 // set:
 //
diff --git a/go/net/psample/subscriber.go b/go/net/psample/subscriber.go
index 6e05b9c..d3532a3 100644
--- a/go/net/psample/subscriber.go
+++ b/go/net/psample/subscriber.go
@@ -1,3 +1,6 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
 // Package psample provides a receiver for sampled network packets using the
 // Netlink psample interface.
 package psample
diff --git a/go/net/ssh/ssh_client.go b/go/net/ssh/ssh_client.go
index d0a0518..73974d3 100644
--- a/go/net/ssh/ssh_client.go
+++ b/go/net/ssh/ssh_client.go
@@ -1,3 +1,6 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
 package ssh
 
 import (
diff --git a/go/net/tinylb/connection_pool.go b/go/net/tinylb/connection_pool.go
index 405dd1d..53b0167 100644
--- a/go/net/tinylb/connection_pool.go
+++ b/go/net/tinylb/connection_pool.go
@@ -1,3 +1,6 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
 package tinylb
 
 import (
diff --git a/go/net/tinylb/tinylb.go b/go/net/tinylb/tinylb.go
index 439628e..3ca6b36 100644
--- a/go/net/tinylb/tinylb.go
+++ b/go/net/tinylb/tinylb.go
@@ -1,3 +1,6 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
 // Package tinylb implements a small and simple userland round-robin load
 // balancer, mostly for TCP connections. However, it is entirely
 // protocol-agnostic, and only expects net.Listener and net.Conn objects.
diff --git a/go/net/tinylb/tinylb_test.go b/go/net/tinylb/tinylb_test.go
index 5b7fb16..1cfb46e 100644
--- a/go/net/tinylb/tinylb_test.go
+++ b/go/net/tinylb/tinylb_test.go
@@ -1,3 +1,6 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
 package tinylb
 
 import (
diff --git a/go/qcow2/qcow2.go b/go/qcow2/qcow2.go
index df7825f..f10b4eb 100644
--- a/go/qcow2/qcow2.go
+++ b/go/qcow2/qcow2.go
@@ -1,3 +1,6 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
 // Package qcow2 implements generating QEMU copy-on-write image files.
 package qcow2
 
diff --git a/go/qcow2/qcow2_test.go b/go/qcow2/qcow2_test.go
index cff77ac..2d7491b 100644
--- a/go/qcow2/qcow2_test.go
+++ b/go/qcow2/qcow2_test.go
@@ -1,3 +1,6 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
 package qcow2
 
 import (
diff --git a/go/types/mapsets/orderedmap.go b/go/types/mapsets/orderedmap.go
index 91b2195..38dc72c 100644
--- a/go/types/mapsets/orderedmap.go
+++ b/go/types/mapsets/orderedmap.go
@@ -1,3 +1,6 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
 package mapsets
 
 import (
diff --git a/go/types/mapsets/orderedmap_test.go b/go/types/mapsets/orderedmap_test.go
index 8bb3c55..3b32bdd 100644
--- a/go/types/mapsets/orderedmap_test.go
+++ b/go/types/mapsets/orderedmap_test.go
@@ -1,3 +1,6 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
 package mapsets
 
 import (