diff --git a/pkg/blob/ref.go b/pkg/blob/ref.go index 6035f940c..444a1f105 100644 --- a/pkg/blob/ref.go +++ b/pkg/blob/ref.go @@ -26,6 +26,11 @@ import ( "reflect" "regexp" "strings" + + // This is a pretty low-level package, so add the Go minimum + // version dependency check here at least. This avoids + // adding it in many other places. + _ "camlistore.org/pkg/depcheck" ) // Pattern is the regular expression which matches a blobref. diff --git a/pkg/depcheck/depcheck.go b/pkg/depcheck/depcheck.go new file mode 100644 index 000000000..d7f9a77ad --- /dev/null +++ b/pkg/depcheck/depcheck.go @@ -0,0 +1,19 @@ +/* +Copyright 2014 The Camlistore 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 depcheck does nothing except for fail to build when +// the system's version of Go is too old. +package depcheck diff --git a/pkg/depcheck/min_go_version.go b/pkg/depcheck/min_go_version.go new file mode 100644 index 000000000..5c6d4f69f --- /dev/null +++ b/pkg/depcheck/min_go_version.go @@ -0,0 +1,28 @@ +// +build !go1.3 + +/* +Copyright 2014 The Camlistore 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 depcheck + +import ` + +**************************************************************************** + + Camlistore requires Go 1.3 or later. + +**************************************************************************** +`