<p>I want to use api to add(remove) taint to(from) k8s node,go code like this:<br></p>
<pre><code>import (
     taints &quot;k8s.io/kubernetes/pkg/util/taints&quot;
)

newNode, updated, err := taints.AddOrUpdateTaint(node,taint)
newNode, removed, err := taints.RemoveTaint(node,taint)
</code></pre>
<p>but when I sync dependencies by GoLand,error occured:</p>
<blockquote>
<p>go: finding module for package k8s.io/kubernetes/pkg/util/taints<br>
go: found k8s.io/kubernetes/pkg/util/taints in k8s.io/kubernetes v1.19.0<br>
go: k8s.io/kubernetes@v1.19.0 requires<br>
    k8s.io/api@v0.0.0: reading k8s.io/api/go.mod at revision v0.0.0: unknown revision v0.0.0
<br></p>
</blockquote>
<p><code>go.mod</code> in my project like this:</p>
<pre><code>go 1.14

require (
    github.com/gammazero/workerpool v1.0.0
    github.com/glc v0.0.0-00010101000000-000000000000
    github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
    github.com/mediocregopher/radix.v2 v0.0.0-20181115013041-b67df6e626f9
    github.com/robfig/cron v1.2.0
    github.com/spf13/pflag v1.0.5
    gopkg.in/yaml.v2 v2.3.0
    k8s.io/api v0.19.0
    k8s.io/apiextensions-apiserver v0.19.0
    k8s.io/apimachinery v0.19.0
    k8s.io/client-go v0.19.0
    k8s.io/metrics v0.19.0
    sigs.k8s.io/controller-runtime v0.6.2
)
</code></pre>
<p>I have found some issues about this error,but it doesn't seem to work for me.(<a href="https://github.com/kubernetes/kubernetes/issues/79384" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/issues/79384</a>)<br><br>
Hope someone can help,thanks~</p>

Leslie__Joe
<p>You can use the <a href="https://github.com/kubernetes/kubernetes/issues/79384#issuecomment-521493597" rel="nofollow noreferrer">script</a> suggested in the issue you mentioned:</p>
<pre><code>#!/bin/sh
set -euo pipefail

VERSION=${1#&quot;v&quot;}
if [ -z &quot;$VERSION&quot; ]; then
    echo &quot;Must specify version!&quot;
    exit 1
fi
MODS=($(
    curl -sS https://raw.githubusercontent.com/kubernetes/kubernetes/v${VERSION}/go.mod |
    sed -n 's|.*k8s.io/\(.*\) =&gt; ./staging/src/k8s.io/.*|k8s.io/\1|p'
))
for MOD in &quot;${MODS[@]}&quot;; do
    V=$(
        go mod download -json &quot;${MOD}@kubernetes-${VERSION}&quot; |
        sed -n 's|.*&quot;Version&quot;: &quot;\(.*\)&quot;.*|\1|p'
    )
    go mod edit &quot;-replace=${MOD}=${MOD}@${V}&quot;
done
go get &quot;k8s.io/kubernetes@v${VERSION}&quot;
</code></pre>
<p>Save this as <code>upgrade-k8s.sh</code> in the same directory as <code>go.mod</code> and run it as follows <code>sh upgrade-k8s.sh 1.19.0</code>. Then commit all the changes made to the <code>go.mod</code> file. Now you can remove <code>upgrade-k8s.sh</code> or keep for future upgrade of <code>k8s.io/kubernetes</code> module.</p>
